@@ -225,10 +225,10 @@ discard block |
||
225 | 225 | } |
226 | 226 | |
227 | 227 | $passwordPolicy = $this->getPasswordPolicy(); |
228 | - $passwordCharset = ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS; |
|
228 | + $passwordCharset = ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS; |
|
229 | 229 | $passwordLength = 8; |
230 | 230 | if (!empty($passwordPolicy)) { |
231 | - $passwordLength = (int)$passwordPolicy['minLength'] > 0 ? (int)$passwordPolicy['minLength'] : $passwordLength; |
|
231 | + $passwordLength = (int) $passwordPolicy['minLength'] > 0 ? (int) $passwordPolicy['minLength'] : $passwordLength; |
|
232 | 232 | $passwordCharset .= $passwordPolicy['enforceSpecialCharacters'] ? ISecureRandom::CHAR_SYMBOLS : ''; |
233 | 233 | } |
234 | 234 | |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | $text = $this->l->t('%1$s shared »%2$s« with you.', [$initiatorDisplayName, $filename]); |
423 | 423 | |
424 | 424 | $emailTemplate->addBodyText( |
425 | - htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')), |
|
425 | + htmlspecialchars($text.' '.$this->l->t('Click the button below to open it.')), |
|
426 | 426 | $text |
427 | 427 | ); |
428 | 428 | $emailTemplate->addBodyButton( |
@@ -446,9 +446,9 @@ discard block |
||
446 | 446 | // The "Reply-To" is set to the sharer if an mail address is configured |
447 | 447 | // also the default footer contains a "Do not reply" which needs to be adjusted. |
448 | 448 | $initiatorEmail = $initiatorUser->getEMailAddress(); |
449 | - if($initiatorEmail !== null) { |
|
449 | + if ($initiatorEmail !== null) { |
|
450 | 450 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
451 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
451 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
452 | 452 | } else { |
453 | 453 | $emailTemplate->addFooter(); |
454 | 454 | } |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
511 | 511 | if ($initiatorEmailAddress !== null) { |
512 | 512 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
513 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
513 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
514 | 514 | } else { |
515 | 515 | $emailTemplate->addFooter(); |
516 | 516 | } |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
569 | 569 | if ($initiatorEmailAddress !== null) { |
570 | 570 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
571 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
571 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
572 | 572 | } else { |
573 | 573 | $emailTemplate->addFooter(); |
574 | 574 | } |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | ->orderBy('id'); |
668 | 668 | |
669 | 669 | $cursor = $qb->execute(); |
670 | - while($data = $cursor->fetch()) { |
|
670 | + while ($data = $cursor->fetch()) { |
|
671 | 671 | $children[] = $this->createShareObject($data); |
672 | 672 | } |
673 | 673 | $cursor->closeCursor(); |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | $qb->execute(); |
717 | 717 | $id = $qb->getLastInsertId(); |
718 | 718 | |
719 | - return (int)$id; |
|
719 | + return (int) $id; |
|
720 | 720 | } |
721 | 721 | |
722 | 722 | /** |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | // a real password was given |
734 | 734 | $validPassword = $plainTextPassword !== null && $plainTextPassword !== ''; |
735 | 735 | |
736 | - if($validPassword && ($originalShare->getPassword() !== $share->getPassword() || |
|
736 | + if ($validPassword && ($originalShare->getPassword() !== $share->getPassword() || |
|
737 | 737 | ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()))) { |
738 | 738 | $this->sendPassword($share, $plainTextPassword); |
739 | 739 | } |
@@ -843,7 +843,7 @@ discard block |
||
843 | 843 | |
844 | 844 | $cursor = $qb->execute(); |
845 | 845 | $shares = []; |
846 | - while($data = $cursor->fetch()) { |
|
846 | + while ($data = $cursor->fetch()) { |
|
847 | 847 | $shares[] = $this->createShareObject($data); |
848 | 848 | } |
849 | 849 | $cursor->closeCursor(); |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | ->execute(); |
896 | 896 | |
897 | 897 | $shares = []; |
898 | - while($data = $cursor->fetch()) { |
|
898 | + while ($data = $cursor->fetch()) { |
|
899 | 899 | $shares[] = $this->createShareObject($data); |
900 | 900 | } |
901 | 901 | $cursor->closeCursor(); |
@@ -934,7 +934,7 @@ discard block |
||
934 | 934 | |
935 | 935 | $cursor = $qb->execute(); |
936 | 936 | |
937 | - while($data = $cursor->fetch()) { |
|
937 | + while ($data = $cursor->fetch()) { |
|
938 | 938 | $shares[] = $this->createShareObject($data); |
939 | 939 | } |
940 | 940 | $cursor->closeCursor(); |
@@ -997,21 +997,21 @@ discard block |
||
997 | 997 | protected function createShareObject($data) { |
998 | 998 | |
999 | 999 | $share = new Share($this->rootFolder, $this->userManager); |
1000 | - $share->setId((int)$data['id']) |
|
1001 | - ->setShareType((int)$data['share_type']) |
|
1002 | - ->setPermissions((int)$data['permissions']) |
|
1000 | + $share->setId((int) $data['id']) |
|
1001 | + ->setShareType((int) $data['share_type']) |
|
1002 | + ->setPermissions((int) $data['permissions']) |
|
1003 | 1003 | ->setTarget($data['file_target']) |
1004 | - ->setMailSend((bool)$data['mail_send']) |
|
1004 | + ->setMailSend((bool) $data['mail_send']) |
|
1005 | 1005 | ->setNote($data['note']) |
1006 | 1006 | ->setToken($data['token']); |
1007 | 1007 | |
1008 | 1008 | $shareTime = new \DateTime(); |
1009 | - $shareTime->setTimestamp((int)$data['stime']); |
|
1009 | + $shareTime->setTimestamp((int) $data['stime']); |
|
1010 | 1010 | $share->setShareTime($shareTime); |
1011 | 1011 | $share->setSharedWith($data['share_with']); |
1012 | 1012 | $share->setPassword($data['password']); |
1013 | - $share->setSendPasswordByTalk((bool)$data['password_by_talk']); |
|
1014 | - $share->setHideDownload((bool)$data['hide_download']); |
|
1013 | + $share->setSendPasswordByTalk((bool) $data['password_by_talk']); |
|
1014 | + $share->setHideDownload((bool) $data['hide_download']); |
|
1015 | 1015 | |
1016 | 1016 | if ($data['uid_initiator'] !== null) { |
1017 | 1017 | $share->setShareOwner($data['uid_owner']); |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | } else { |
1020 | 1020 | //OLD SHARE |
1021 | 1021 | $share->setSharedBy($data['uid_owner']); |
1022 | - $path = $this->getNode($share->getSharedBy(), (int)$data['file_source']); |
|
1022 | + $path = $this->getNode($share->getSharedBy(), (int) $data['file_source']); |
|
1023 | 1023 | |
1024 | 1024 | $owner = $path->getOwner(); |
1025 | 1025 | $share->setShareOwner($owner->getUID()); |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | } |
1033 | 1033 | } |
1034 | 1034 | |
1035 | - $share->setNodeId((int)$data['file_source']); |
|
1035 | + $share->setNodeId((int) $data['file_source']); |
|
1036 | 1036 | $share->setNodeType($data['item_type']); |
1037 | 1037 | |
1038 | 1038 | $share->setProviderId($this->identifier()); |
@@ -1149,7 +1149,7 @@ discard block |
||
1149 | 1149 | ); |
1150 | 1150 | } |
1151 | 1151 | |
1152 | - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
1152 | + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
1153 | 1153 | $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
1154 | 1154 | |
1155 | 1155 | $qb->orderBy('id'); |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | ); |
1204 | 1204 | |
1205 | 1205 | $cursor = $qb->execute(); |
1206 | - while($data = $cursor->fetch()) { |
|
1206 | + while ($data = $cursor->fetch()) { |
|
1207 | 1207 | try { |
1208 | 1208 | $share = $this->createShareObject($data); |
1209 | 1209 | } catch (InvalidShare $e) { |