@@ -87,26 +87,26 @@ discard block |
||
87 | 87 | |
88 | 88 | |
89 | 89 | // specific value |
90 | - public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
91 | - public const CFG_SINGLE = 1; // Circle with only one single member. |
|
92 | - public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
90 | + public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default. |
|
91 | + public const CFG_SINGLE = 1; // Circle with only one single member. |
|
92 | + public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it. |
|
93 | 93 | |
94 | 94 | // bitwise |
95 | - public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
96 | - public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
97 | - public const CFG_OPEN = 16; // Circle is open, people can join |
|
98 | - public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
99 | - public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
100 | - public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
101 | - public const CFG_PROTECTED = 256; // Password protected to join/request |
|
102 | - public const CFG_NO_OWNER = 512; // no owner, only members |
|
103 | - public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
104 | - public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
105 | - public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
106 | - public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
107 | - public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
108 | - public const CFG_FEDERATED = 32768; // Federated |
|
109 | - public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
95 | + public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited |
|
96 | + public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it |
|
97 | + public const CFG_OPEN = 16; // Circle is open, people can join |
|
98 | + public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted |
|
99 | + public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator |
|
100 | + public const CFG_FRIEND = 128; // Members of the circle can invite their friends |
|
101 | + public const CFG_PROTECTED = 256; // Password protected to join/request |
|
102 | + public const CFG_NO_OWNER = 512; // no owner, only members |
|
103 | + public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity |
|
104 | + public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles |
|
105 | + public const CFG_LOCAL = 4096; // Local even on GlobalScale |
|
106 | + public const CFG_ROOT = 8192; // Circle cannot be inside another Circle |
|
107 | + public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle |
|
108 | + public const CFG_FEDERATED = 32768; // Federated |
|
109 | + public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle |
|
110 | 110 | |
111 | 111 | public static $DEF_CFG_MAX = 131071; |
112 | 112 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | */ |
470 | 470 | public function addInheritedMembers(array $members): self { |
471 | 471 | $knownIds = array_map( |
472 | - function (Member $member): string { |
|
472 | + function(Member $member): string { |
|
473 | 473 | return $member->getId(); |
474 | 474 | }, $this->inheritedMembers |
475 | 475 | ); |
@@ -842,24 +842,24 @@ discard block |
||
842 | 842 | * @throws CircleNotFoundException |
843 | 843 | */ |
844 | 844 | public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow { |
845 | - if ($this->get($prefix . 'unique_id', $data) === '') { |
|
845 | + if ($this->get($prefix.'unique_id', $data) === '') { |
|
846 | 846 | throw new CircleNotFoundException(); |
847 | 847 | } |
848 | 848 | |
849 | - $this->setSingleId($this->get($prefix . 'unique_id', $data)) |
|
850 | - ->setName($this->get($prefix . 'name', $data)) |
|
851 | - ->setDisplayName($this->get($prefix . 'display_name', $data)) |
|
852 | - ->setSanitizedName($this->get($prefix . 'sanitized_name', $data)) |
|
853 | - ->setConfig($this->getInt($prefix . 'config', $data)) |
|
854 | - ->setSource($this->getInt($prefix . 'source', $data)) |
|
855 | - ->setInstance($this->get($prefix . 'instance', $data)) |
|
856 | - ->setPopulation($this->getInt($prefix . 'population', $data)) |
|
857 | - ->setSettings($this->getArray($prefix . 'settings', $data)) |
|
858 | - ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data)) |
|
859 | - ->setContactGroupName($this->get($prefix . 'contact_groupname', $data)) |
|
860 | - ->setDescription($this->get($prefix . 'description', $data)); |
|
861 | - |
|
862 | - $creation = $this->get($prefix . 'creation', $data); |
|
849 | + $this->setSingleId($this->get($prefix.'unique_id', $data)) |
|
850 | + ->setName($this->get($prefix.'name', $data)) |
|
851 | + ->setDisplayName($this->get($prefix.'display_name', $data)) |
|
852 | + ->setSanitizedName($this->get($prefix.'sanitized_name', $data)) |
|
853 | + ->setConfig($this->getInt($prefix.'config', $data)) |
|
854 | + ->setSource($this->getInt($prefix.'source', $data)) |
|
855 | + ->setInstance($this->get($prefix.'instance', $data)) |
|
856 | + ->setPopulation($this->getInt($prefix.'population', $data)) |
|
857 | + ->setSettings($this->getArray($prefix.'settings', $data)) |
|
858 | + ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data)) |
|
859 | + ->setContactGroupName($this->get($prefix.'contact_groupname', $data)) |
|
860 | + ->setDescription($this->get($prefix.'description', $data)); |
|
861 | + |
|
862 | + $creation = $this->get($prefix.'creation', $data); |
|
863 | 863 | $this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp()); |
864 | 864 | |
865 | 865 | $this->getManager()->manageImportFromDatabase($this, $data, $prefix); |