Completed
Pull Request — master (#551)
by Maxence
02:25
created
lib/Model/Circle.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -83,23 +83,23 @@  discard block
 block discarded – undo
83 83
 
84 84
 
85 85
 	// specific value
86
-	const CFG_CIRCLE = 0;        // only for code readability. Circle is locked by default.
87
-	const CFG_SINGLE = 1;        // Circle with only one single member.
88
-	const CFG_PERSONAL = 2;      // Personal circle, only the owner can see it.
86
+	const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default.
87
+	const CFG_SINGLE = 1; // Circle with only one single member.
88
+	const CFG_PERSONAL = 2; // Personal circle, only the owner can see it.
89 89
 
90 90
 	// bitwise
91
-	const CFG_SYSTEM = 4;         // System Circl (not managed by the official front-end). Meaning some config are limited
92
-	const CFG_VISIBLE = 8;        // Visible to everyone, if not visible, people have to know its name to be able to find it
93
-	const CFG_OPEN = 16;          // Circle is open, people can join
94
-	const CFG_INVITE = 32;        // Adding a member generate an invitation that needs to be accepted
95
-	const CFG_REQUEST = 64;       // Request to join Circles needs to be confirmed by a moderator
96
-	const CFG_FRIEND = 128;       // Members of the circle can invite their friends
97
-	const CFG_PROTECTED = 256;    // Password protected to join/request
98
-	const CFG_NO_OWNER = 512;     // no owner, only members
99
-	const CFG_HIDDEN = 1024;      // hidden from listing, but available as a share entity
100
-	const CFG_BACKEND = 2048;     // Fully hidden, only backend Circles
101
-	const CFG_ROOT = 4096;        // Circle cannot be inside another Circle
102
-	const CFG_FEDERATED = 8192;   // Federated
91
+	const CFG_SYSTEM = 4; // System Circl (not managed by the official front-end). Meaning some config are limited
92
+	const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it
93
+	const CFG_OPEN = 16; // Circle is open, people can join
94
+	const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted
95
+	const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator
96
+	const CFG_FRIEND = 128; // Members of the circle can invite their friends
97
+	const CFG_PROTECTED = 256; // Password protected to join/request
98
+	const CFG_NO_OWNER = 512; // no owner, only members
99
+	const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity
100
+	const CFG_BACKEND = 2048; // Fully hidden, only backend Circles
101
+	const CFG_ROOT = 4096; // Circle cannot be inside another Circle
102
+	const CFG_FEDERATED = 8192; // Federated
103 103
 
104 104
 
105 105
 	public static $DEF_CFG_MAX = 16383;
@@ -634,21 +634,21 @@  discard block
 block discarded – undo
634 634
 	 * @throws CircleNotFoundException
635 635
 	 */
636 636
 	public function importFromDatabase(array $data, string $prefix = ''): INC21QueryRow {
637
-		if (!array_key_exists($prefix . 'unique_id', $data)) {
637
+		if (!array_key_exists($prefix.'unique_id', $data)) {
638 638
 			throw new CircleNotFoundException();
639 639
 		}
640 640
 
641
-		$this->setId($this->get($prefix . 'unique_id', $data))
642
-			 ->setName($this->get($prefix . 'name', $data))
643
-			 ->setDisplayName($this->get($prefix . 'alt_name', $data))
644
-			 ->setConfig($this->getInt($prefix . 'config', $data))
645
-			 ->setInstance($this->get($prefix . 'instance', $data))
646
-			 ->setSettings($this->getArray($prefix . 'settings', $data))
647
-			 ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data))
648
-			 ->setContactGroupName($this->get($prefix . 'contact_groupname', $data))
649
-			 ->setDescription($this->get($prefix . 'description', $data));
650
-
651
-		$creation = $this->get($prefix . 'creation', $data);
641
+		$this->setId($this->get($prefix.'unique_id', $data))
642
+			 ->setName($this->get($prefix.'name', $data))
643
+			 ->setDisplayName($this->get($prefix.'alt_name', $data))
644
+			 ->setConfig($this->getInt($prefix.'config', $data))
645
+			 ->setInstance($this->get($prefix.'instance', $data))
646
+			 ->setSettings($this->getArray($prefix.'settings', $data))
647
+			 ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data))
648
+			 ->setContactGroupName($this->get($prefix.'contact_groupname', $data))
649
+			 ->setDescription($this->get($prefix.'description', $data));
650
+
651
+		$creation = $this->get($prefix.'creation', $data);
652 652
 		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
653 653
 
654 654
 		$this->getManager()->importOwnerFromDatabase($this, $data);
Please login to merge, or discard this patch.