@@ -211,10 +211,10 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | $passwordPolicy = $this->getPasswordPolicy(); |
| 214 | - $passwordCharset = ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER . ISecureRandom::CHAR_DIGITS; |
|
| 214 | + $passwordCharset = ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER.ISecureRandom::CHAR_DIGITS; |
|
| 215 | 215 | $passwordLength = 8; |
| 216 | 216 | if (!empty($passwordPolicy)) { |
| 217 | - $passwordLength = (int)$passwordPolicy['minLength'] > 0 ? (int)$passwordPolicy['minLength'] : $passwordLength; |
|
| 217 | + $passwordLength = (int) $passwordPolicy['minLength'] > 0 ? (int) $passwordPolicy['minLength'] : $passwordLength; |
|
| 218 | 218 | $passwordCharset .= $passwordPolicy['enforceSpecialCharacters'] ? ISecureRandom::CHAR_SYMBOLS : ''; |
| 219 | 219 | } |
| 220 | 220 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | $text = $this->l->t('%s shared »%s« with you.', [$initiatorDisplayName, $filename]); |
| 407 | 407 | |
| 408 | 408 | $emailTemplate->addBodyText( |
| 409 | - htmlspecialchars($text . ' ' . $this->l->t('Click the button below to open it.')), |
|
| 409 | + htmlspecialchars($text.' '.$this->l->t('Click the button below to open it.')), |
|
| 410 | 410 | $text |
| 411 | 411 | ); |
| 412 | 412 | $emailTemplate->addBodyButton( |
@@ -430,9 +430,9 @@ discard block |
||
| 430 | 430 | // The "Reply-To" is set to the sharer if an mail address is configured |
| 431 | 431 | // also the default footer contains a "Do not reply" which needs to be adjusted. |
| 432 | 432 | $initiatorEmail = $initiatorUser->getEMailAddress(); |
| 433 | - if($initiatorEmail !== null) { |
|
| 433 | + if ($initiatorEmail !== null) { |
|
| 434 | 434 | $message->setReplyTo([$initiatorEmail => $initiatorDisplayName]); |
| 435 | - $emailTemplate->addFooter($instanceName . ($this->defaults->getSlogan() !== '' ? ' - ' . $this->defaults->getSlogan() : '')); |
|
| 435 | + $emailTemplate->addFooter($instanceName.($this->defaults->getSlogan() !== '' ? ' - '.$this->defaults->getSlogan() : '')); |
|
| 436 | 436 | } else { |
| 437 | 437 | $emailTemplate->addFooter(); |
| 438 | 438 | } |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 494 | 494 | if ($initiatorEmailAddress !== null) { |
| 495 | 495 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 496 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 496 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 497 | 497 | } else { |
| 498 | 498 | $emailTemplate->addFooter(); |
| 499 | 499 | } |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 552 | 552 | if ($initiatorEmailAddress !== null) { |
| 553 | 553 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
| 554 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 554 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 555 | 555 | } else { |
| 556 | 556 | $emailTemplate->addFooter(); |
| 557 | 557 | } |
@@ -643,7 +643,7 @@ discard block |
||
| 643 | 643 | ->orderBy('id'); |
| 644 | 644 | |
| 645 | 645 | $cursor = $qb->execute(); |
| 646 | - while($data = $cursor->fetch()) { |
|
| 646 | + while ($data = $cursor->fetch()) { |
|
| 647 | 647 | $children[] = $this->createShareObject($data); |
| 648 | 648 | } |
| 649 | 649 | $cursor->closeCursor(); |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $qb->execute(); |
| 691 | 691 | $id = $qb->getLastInsertId(); |
| 692 | 692 | |
| 693 | - return (int)$id; |
|
| 693 | + return (int) $id; |
|
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | /** |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | // a real password was given |
| 708 | 708 | $validPassword = $plainTextPassword !== null && $plainTextPassword !== ''; |
| 709 | 709 | |
| 710 | - if($validPassword && ($originalShare->getPassword() !== $share->getPassword() || |
|
| 710 | + if ($validPassword && ($originalShare->getPassword() !== $share->getPassword() || |
|
| 711 | 711 | ($originalShare->getSendPasswordByTalk() && !$share->getSendPasswordByTalk()))) { |
| 712 | 712 | $this->sendPassword($share, $plainTextPassword); |
| 713 | 713 | } |
@@ -811,7 +811,7 @@ discard block |
||
| 811 | 811 | |
| 812 | 812 | $cursor = $qb->execute(); |
| 813 | 813 | $shares = []; |
| 814 | - while($data = $cursor->fetch()) { |
|
| 814 | + while ($data = $cursor->fetch()) { |
|
| 815 | 815 | $shares[] = $this->createShareObject($data); |
| 816 | 816 | } |
| 817 | 817 | $cursor->closeCursor(); |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | ->execute(); |
| 864 | 864 | |
| 865 | 865 | $shares = []; |
| 866 | - while($data = $cursor->fetch()) { |
|
| 866 | + while ($data = $cursor->fetch()) { |
|
| 867 | 867 | $shares[] = $this->createShareObject($data); |
| 868 | 868 | } |
| 869 | 869 | $cursor->closeCursor(); |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | |
| 903 | 903 | $cursor = $qb->execute(); |
| 904 | 904 | |
| 905 | - while($data = $cursor->fetch()) { |
|
| 905 | + while ($data = $cursor->fetch()) { |
|
| 906 | 906 | $shares[] = $this->createShareObject($data); |
| 907 | 907 | } |
| 908 | 908 | $cursor->closeCursor(); |
@@ -965,16 +965,16 @@ discard block |
||
| 965 | 965 | protected function createShareObject($data) { |
| 966 | 966 | |
| 967 | 967 | $share = new Share($this->rootFolder, $this->userManager); |
| 968 | - $share->setId((int)$data['id']) |
|
| 969 | - ->setShareType((int)$data['share_type']) |
|
| 970 | - ->setPermissions((int)$data['permissions']) |
|
| 968 | + $share->setId((int) $data['id']) |
|
| 969 | + ->setShareType((int) $data['share_type']) |
|
| 970 | + ->setPermissions((int) $data['permissions']) |
|
| 971 | 971 | ->setTarget($data['file_target']) |
| 972 | - ->setMailSend((bool)$data['mail_send']) |
|
| 972 | + ->setMailSend((bool) $data['mail_send']) |
|
| 973 | 973 | ->setNote($data['note']) |
| 974 | 974 | ->setToken($data['token']); |
| 975 | 975 | |
| 976 | 976 | $shareTime = new \DateTime(); |
| 977 | - $shareTime->setTimestamp((int)$data['stime']); |
|
| 977 | + $shareTime->setTimestamp((int) $data['stime']); |
|
| 978 | 978 | $share->setShareTime($shareTime); |
| 979 | 979 | $share->setSharedWith($data['share_with']); |
| 980 | 980 | $share->setPassword($data['password']); |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | } else { |
| 987 | 987 | //OLD SHARE |
| 988 | 988 | $share->setSharedBy($data['uid_owner']); |
| 989 | - $path = $this->getNode($share->getSharedBy(), (int)$data['file_source']); |
|
| 989 | + $path = $this->getNode($share->getSharedBy(), (int) $data['file_source']); |
|
| 990 | 990 | |
| 991 | 991 | $owner = $path->getOwner(); |
| 992 | 992 | $share->setShareOwner($owner->getUID()); |
@@ -999,7 +999,7 @@ discard block |
||
| 999 | 999 | } |
| 1000 | 1000 | } |
| 1001 | 1001 | |
| 1002 | - $share->setNodeId((int)$data['file_source']); |
|
| 1002 | + $share->setNodeId((int) $data['file_source']); |
|
| 1003 | 1003 | $share->setNodeType($data['item_type']); |
| 1004 | 1004 | |
| 1005 | 1005 | $share->setProviderId($this->identifier()); |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | ); |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 1119 | - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 1119 | + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); |
|
| 1120 | 1120 | $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); |
| 1121 | 1121 | |
| 1122 | 1122 | $qb->orderBy('id'); |