@@ -194,7 +194,7 @@ |
||
| 194 | 194 | throw new OCSException('works only from local instance', 404); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $userId = $currentUser->getUserId() . '/' . $userId; |
|
| 197 | + $userId = $currentUser->getUserId().'/'.$userId; |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | $federatedUser = $this->federatedUserService->generateFederatedUser($userId, $type); |
@@ -74,8 +74,8 @@ |
||
| 74 | 74 | $result[$instance] = $item->gData('files'); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - \OC::$server->getLogger()->log(3, 'FILES: ' . json_encode($result)); |
|
| 78 | - \OC::$server->getLogger()->log(3, 'MAILS: ' . json_encode($federatedUsers)); |
|
| 77 | + \OC::$server->getLogger()->log(3, 'FILES: '.json_encode($result)); |
|
| 78 | + \OC::$server->getLogger()->log(3, 'MAILS: '.json_encode($federatedUsers)); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | } |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | * @return string |
| 110 | 110 | */ |
| 111 | 111 | protected function stripPath($path) { |
| 112 | - $prefix = '/' . $this->userId . '/files'; |
|
| 112 | + $prefix = '/'.$this->userId.'/files'; |
|
| 113 | 113 | |
| 114 | 114 | return rtrim(substr($path, strlen($prefix)), '/'); |
| 115 | 115 | } |
@@ -325,10 +325,10 @@ discard block |
||
| 325 | 325 | protected function generateMember(Circle $circle, Member $member): Member { |
| 326 | 326 | try { |
| 327 | 327 | if ($member->getSingleId() !== '') { |
| 328 | - $userId = $member->getSingleId() . '@' . $member->getInstance(); |
|
| 328 | + $userId = $member->getSingleId().'@'.$member->getInstance(); |
|
| 329 | 329 | $federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE); |
| 330 | 330 | } else { |
| 331 | - $userId = $member->getUserId() . '@' . $member->getInstance(); |
|
| 331 | + $userId = $member->getUserId().'@'.$member->getInstance(); |
|
| 332 | 332 | $federatedUser = |
| 333 | 333 | $this->federatedUserService->getFederatedUser($userId, $member->getUserType()); |
| 334 | 334 | } |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | $this->sendMailExistingShares($template, $author, $recipient); |
| 602 | 602 | $this->sendPasswordExistingShares($author, $recipient, $password); |
| 603 | 603 | } catch (Exception $e) { |
| 604 | - $this->miscService->log('Failed to send mail about existing share ' . $e->getMessage()); |
|
| 604 | + $this->miscService->log('Failed to send mail about existing share '.$e->getMessage()); |
|
| 605 | 605 | } |
| 606 | 606 | } |
| 607 | 607 | |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
| 754 | 754 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
| 755 | 755 | |
| 756 | - $this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0); |
|
| 756 | + $this->miscService->log("Sending password mail about existing files to '".$email."'", 0); |
|
| 757 | 757 | |
| 758 | 758 | $plainBodyPart = $this->l10n->t( |
| 759 | 759 | "%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n", |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | $message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]); |
| 796 | 796 | if ($authorEmail !== null) { |
| 797 | 797 | $message->setReplyTo([$authorEmail => $authorName]); |
| 798 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
| 798 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
| 799 | 799 | } else { |
| 800 | 800 | $emailTemplate->addFooter(); |
| 801 | 801 | } |
@@ -394,14 +394,14 @@ |
||
| 394 | 394 | * @throws FederatedUserNotFoundException |
| 395 | 395 | */ |
| 396 | 396 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 397 | - if ($this->get($prefix . 'single_id', $data) === '') { |
|
| 397 | + if ($this->get($prefix.'single_id', $data) === '') { |
|
| 398 | 398 | throw new FederatedUserNotFoundException(); |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | - $this->setSingleId($this->get($prefix . 'single_id', $data)); |
|
| 402 | - $this->setUserId($this->get($prefix . 'user_id', $data)); |
|
| 403 | - $this->setUserType($this->getInt($prefix . 'user_type', $data)); |
|
| 404 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
| 401 | + $this->setSingleId($this->get($prefix.'single_id', $data)); |
|
| 402 | + $this->setUserId($this->get($prefix.'user_id', $data)); |
|
| 403 | + $this->setUserType($this->getInt($prefix.'user_type', $data)); |
|
| 404 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
| 405 | 405 | |
| 406 | 406 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
| 407 | 407 | |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | use TArrayTools; |
| 52 | 52 | |
| 53 | - const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
| 54 | - const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
| 55 | - const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
| 56 | - const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
| 57 | - const TYPE_GLOBAL_SCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
| 53 | + const TYPE_UNKNOWN = 'Unknown'; // not trusted |
|
| 54 | + const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle. |
|
| 55 | + const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted if a member belongs to the circle. |
|
| 56 | + const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted. |
|
| 57 | + const TYPE_GLOBAL_SCALE = 'GlobalScale'; // every Circle is broadcasted, |
|
| 58 | 58 | |
| 59 | 59 | public static $LIST_TYPE = [ |
| 60 | 60 | self::TYPE_UNKNOWN, |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | ]; |
| 433 | 433 | |
| 434 | 434 | if ($this->getAuthSigned() !== '') { |
| 435 | - $data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned(); |
|
| 435 | + $data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned(); |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return array_filter(array_merge($data, parent::jsonSerialize())); |
@@ -447,16 +447,16 @@ discard block |
||
| 447 | 447 | * @throws RemoteNotFoundException |
| 448 | 448 | */ |
| 449 | 449 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 450 | - if ($this->getInt($prefix . 'id', $data) === 0) { |
|
| 450 | + if ($this->getInt($prefix.'id', $data) === 0) { |
|
| 451 | 451 | throw new RemoteNotFoundException(); |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | - $this->setDbId($this->getInt($prefix . 'id', $data)); |
|
| 455 | - $this->import($this->getArray($prefix . 'item', $data)); |
|
| 456 | - $this->setOrigData($this->getArray($prefix . 'item', $data)); |
|
| 457 | - $this->setType($this->get($prefix . 'type', $data)); |
|
| 458 | - $this->setInstance($this->get($prefix . 'instance', $data)); |
|
| 459 | - $this->setId($this->get($prefix . 'href', $data)); |
|
| 454 | + $this->setDbId($this->getInt($prefix.'id', $data)); |
|
| 455 | + $this->import($this->getArray($prefix.'item', $data)); |
|
| 456 | + $this->setOrigData($this->getArray($prefix.'item', $data)); |
|
| 457 | + $this->setType($this->get($prefix.'type', $data)); |
|
| 458 | + $this->setInstance($this->get($prefix.'instance', $data)); |
|
| 459 | + $this->setId($this->get($prefix.'href', $data)); |
|
| 460 | 460 | |
| 461 | 461 | return $this; |
| 462 | 462 | } |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | return $this->mountPoint; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - return '/' . $this->getInitiator()->getUserId() . '/files/' . ltrim($this->mountPoint, '/'); |
|
| 193 | + return '/'.$this->getInitiator()->getUserId().'/files/'.ltrim($this->mountPoint, '/'); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
@@ -84,26 +84,26 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | // specific value |
| 87 | - const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 88 | - const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 89 | - const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 87 | + const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
| 88 | + const CFG_SINGLE = 1; // Circle with only one single member. |
|
| 89 | + const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
| 90 | 90 | |
| 91 | 91 | // bitwise |
| 92 | - const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 93 | - const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 94 | - const CFG_OPEN = 16; // Circle is open, people can join |
|
| 95 | - const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 96 | - const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 97 | - const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 98 | - const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 99 | - const CFG_NO_OWNER = 512; // no owner, only members |
|
| 100 | - const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 101 | - const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 102 | - const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 103 | - const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 104 | - const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 105 | - const CFG_FEDERATED = 32768; // Federated |
|
| 106 | - const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 92 | + const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
| 93 | + const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
| 94 | + const CFG_OPEN = 16; // Circle is open, people can join |
|
| 95 | + const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
| 96 | + const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
| 97 | + const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
| 98 | + const CFG_PROTECTED = 256; // Password protected to join/request |
|
| 99 | + const CFG_NO_OWNER = 512; // no owner, only members |
|
| 100 | + const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
| 101 | + const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
| 102 | + const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
| 103 | + const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
| 104 | + const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
| 105 | + const CFG_FEDERATED = 32768; // Federated |
|
| 106 | + const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
| 107 | 107 | |
| 108 | 108 | public static $DEF_CFG_MAX = 131071; |
| 109 | 109 | |
@@ -717,22 +717,22 @@ discard block |
||
| 717 | 717 | * @throws CircleNotFoundException |
| 718 | 718 | */ |
| 719 | 719 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 720 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
| 720 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
| 721 | 721 | throw new CircleNotFoundException(); |
| 722 | 722 | } |
| 723 | 723 | |
| 724 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
| 725 | - ->setName($this->get($prefix . 'name', $data)) |
|
| 726 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
| 727 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
| 728 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
| 729 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
| 730 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
| 731 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
| 732 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
| 733 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
| 734 | - |
|
| 735 | - $creation = $this->get($prefix . 'creation', $data); |
|
| 724 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
| 725 | + ->setName($this->get($prefix.'name', $data)) |
|
| 726 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
| 727 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
| 728 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
| 729 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
| 730 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
| 731 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
| 732 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
| 733 | + ->setDescription($this->get($prefix.'description', $data)); |
|
| 734 | + |
|
| 735 | + $creation = $this->get($prefix.'creation', $data); |
|
| 736 | 736 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
| 737 | 737 | |
| 738 | 738 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |
@@ -504,29 +504,29 @@ |
||
| 504 | 504 | * @throws FileCacheNotFoundException |
| 505 | 505 | */ |
| 506 | 506 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
| 507 | - if ($this->getInt($prefix . 'fileid', $data) === 0) { |
|
| 507 | + if ($this->getInt($prefix.'fileid', $data) === 0) { |
|
| 508 | 508 | throw new FileCacheNotFoundException(); |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | - $this->setId($this->getInt($prefix . 'fileid', $data)); |
|
| 512 | - $this->setPath($this->get($prefix . 'path', $data)); |
|
| 513 | - $this->setPermissions($this->getInt($prefix . 'permissions', $data)); |
|
| 514 | - $this->setStorageId($this->getInt($prefix . 'storage', $data)); |
|
| 515 | - $this->setPathHash($this->get($prefix . 'path_hash', $data)); |
|
| 516 | - $this->setParent($this->getInt($prefix . 'parent', $data)); |
|
| 517 | - $this->setName($this->get($prefix . 'name', $data)); |
|
| 518 | - $this->setMimeType($this->getInt($prefix . 'mimetype', $data)); |
|
| 519 | - $this->setMimePart($this->getInt($prefix . 'mimepart', $data)); |
|
| 520 | - $this->setSize($this->getInt($prefix . 'size', $data)); |
|
| 521 | - $this->setMTime($this->getInt($prefix . 'mtime', $data)); |
|
| 522 | - $this->setStorageMTime($this->getInt($prefix . 'storage_mtime', $data)); |
|
| 523 | - $this->setEncrypted($this->getBool($prefix . 'encrypted', $data)); |
|
| 524 | - $this->setUnencryptedSize($this->getInt($prefix . 'unencrypted_size', $data)); |
|
| 525 | - $this->setEtag($this->get($prefix . 'etag', $data)); |
|
| 526 | - $this->setChecksum($this->get($prefix . 'checksum', $data)); |
|
| 511 | + $this->setId($this->getInt($prefix.'fileid', $data)); |
|
| 512 | + $this->setPath($this->get($prefix.'path', $data)); |
|
| 513 | + $this->setPermissions($this->getInt($prefix.'permissions', $data)); |
|
| 514 | + $this->setStorageId($this->getInt($prefix.'storage', $data)); |
|
| 515 | + $this->setPathHash($this->get($prefix.'path_hash', $data)); |
|
| 516 | + $this->setParent($this->getInt($prefix.'parent', $data)); |
|
| 517 | + $this->setName($this->get($prefix.'name', $data)); |
|
| 518 | + $this->setMimeType($this->getInt($prefix.'mimetype', $data)); |
|
| 519 | + $this->setMimePart($this->getInt($prefix.'mimepart', $data)); |
|
| 520 | + $this->setSize($this->getInt($prefix.'size', $data)); |
|
| 521 | + $this->setMTime($this->getInt($prefix.'mtime', $data)); |
|
| 522 | + $this->setStorageMTime($this->getInt($prefix.'storage_mtime', $data)); |
|
| 523 | + $this->setEncrypted($this->getBool($prefix.'encrypted', $data)); |
|
| 524 | + $this->setUnencryptedSize($this->getInt($prefix.'unencrypted_size', $data)); |
|
| 525 | + $this->setEtag($this->get($prefix.'etag', $data)); |
|
| 526 | + $this->setChecksum($this->get($prefix.'checksum', $data)); |
|
| 527 | 527 | |
| 528 | 528 | // small hack as there is no reason to call a recursive method for a single entry from the table |
| 529 | - $this->setStorage($this->get($prefix . CoreQueryBuilder::STORAGES . '_id', $data)); |
|
| 529 | + $this->setStorage($this->get($prefix.CoreQueryBuilder::STORAGES.'_id', $data)); |
|
| 530 | 530 | |
| 531 | 531 | return $this; |
| 532 | 532 | } |