@@ -92,27 +92,27 @@ discard block |
||
92 | 92 | |
93 | 93 | |
94 | 94 | // specific value |
95 | - public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
96 | - public const CFG_SINGLE = 1; // Circle with only one single member. |
|
97 | - public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
95 | + public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
96 | + public const CFG_SINGLE = 1; // Circle with only one single member. |
|
97 | + public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
98 | 98 | |
99 | 99 | // bitwise |
100 | - public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
101 | - public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
102 | - public const CFG_OPEN = 16; // Circle is open, people can join |
|
103 | - public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
104 | - public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
105 | - public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
106 | - public const CFG_PROTECTED = 256; // Password protected to join/request |
|
107 | - public const CFG_NO_OWNER = 512; // no owner, only members |
|
108 | - public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
109 | - public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
110 | - public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
111 | - public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
112 | - public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
113 | - public const CFG_FEDERATED = 32768; // Federated |
|
114 | - public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
115 | - public const CFG_APP = 131072; // Some features are not available to the OCS API (ie. destroying Circle) |
|
100 | + public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
101 | + public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
102 | + public const CFG_OPEN = 16; // Circle is open, people can join |
|
103 | + public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
104 | + public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
105 | + public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
106 | + public const CFG_PROTECTED = 256; // Password protected to join/request |
|
107 | + public const CFG_NO_OWNER = 512; // no owner, only members |
|
108 | + public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
109 | + public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
110 | + public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
111 | + public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
112 | + public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
113 | + public const CFG_FEDERATED = 32768; // Federated |
|
114 | + public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
115 | + public const CFG_APP = 131072; // Some features are not available to the OCS API (ie. destroying Circle) |
|
116 | 116 | public static $DEF_CFG_MAX = 262143; |
117 | 117 | |
118 | 118 | |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | */ |
482 | 482 | public function addInheritedMembers(array $members): self { |
483 | 483 | $knownIds = array_map( |
484 | - function (Member $member): string { |
|
484 | + function(Member $member): string { |
|
485 | 485 | return $member->getId(); |
486 | 486 | }, $this->inheritedMembers |
487 | 487 | ); |
@@ -895,25 +895,25 @@ discard block |
||
895 | 895 | * @throws CircleNotFoundException |
896 | 896 | */ |
897 | 897 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
898 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
898 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
899 | 899 | throw new CircleNotFoundException(); |
900 | 900 | } |
901 | 901 | |
902 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
903 | - ->setName($this->get($prefix . 'name', $data)) |
|
904 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
905 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
906 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
907 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
908 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
909 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
910 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
911 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
912 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
913 | - |
|
914 | - $creation = $this->get($prefix . 'creation', $data); |
|
902 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
903 | + ->setName($this->get($prefix.'name', $data)) |
|
904 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
905 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
906 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
907 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
908 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
909 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
910 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
911 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
912 | + ->setDescription($this->get($prefix.'description', $data)); |
|
913 | + |
|
914 | + $creation = $this->get($prefix.'creation', $data); |
|
915 | 915 | $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $creation); |
916 | - $timestamp = $dateTime ? $dateTime->getTimestamp() : (int) strtotime($creation); |
|
916 | + $timestamp = $dateTime ? $dateTime->getTimestamp() : (int)strtotime($creation); |
|
917 | 917 | $this->setCreation($timestamp); |
918 | 918 | |
919 | 919 | $this->setPopulation($this->getInt('population', $this->getSettings())); |