@@ -41,25 +41,25 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
44 | - public function getLogged(){ |
|
44 | + public function getLogged() { |
|
45 | 45 | return $this->logged; |
46 | 46 | } |
47 | - public function getSuperAdmin(){ |
|
47 | + public function getSuperAdmin() { |
|
48 | 48 | return $this->super_admin; |
49 | 49 | } |
50 | - public function getIdListeDroitAcces(){ |
|
50 | + public function getIdListeDroitAcces() { |
|
51 | 51 | return $this->id_liste_droit_acces; |
52 | 52 | } |
53 | - public function getModifSeo(){ |
|
53 | + public function getModifSeo() { |
|
54 | 54 | return $this->modif_seo; |
55 | 55 | } |
56 | - public function getModifContenu(){ |
|
56 | + public function getModifContenu() { |
|
57 | 57 | return $this->modif_contenu; |
58 | 58 | } |
59 | - public function getModifNavigation(){ |
|
59 | + public function getModifNavigation() { |
|
60 | 60 | return $this->modif_navigation; |
61 | 61 | } |
62 | - public function getSupprimerPage(){ |
|
62 | + public function getSupprimerPage() { |
|
63 | 63 | return $this->supprimer_page; |
64 | 64 | } |
65 | 65 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | //page sans droit dans admin |
142 | 142 | $all_access = array("gestion-comptes/mon-compte", "index"); |
143 | 143 | |
144 | - if (($this->super_admin == 1) || (in_array($this->getListeDroitPage($page), $this->getListeDroitAcces()))|| (in_array($page, $all_access))) { |
|
144 | + if (($this->super_admin == 1) || (in_array($this->getListeDroitPage($page), $this->getListeDroitAcces())) || (in_array($page, $all_access))) { |
|
145 | 145 | return true; |
146 | 146 | } |
147 | 147 | else { |
@@ -78,7 +78,9 @@ discard block |
||
78 | 78 | "); |
79 | 79 | |
80 | 80 | if ((is_array($query)) && (count($query) > 0)) { |
81 | - foreach ($query as $obj) $liste_droit_acces[] = $obj->droit_acces; |
|
81 | + foreach ($query as $obj) { |
|
82 | + $liste_droit_acces[] = $obj->droit_acces; |
|
83 | + } |
|
82 | 84 | } |
83 | 85 | |
84 | 86 | return $liste_droit_acces; |
@@ -93,7 +95,9 @@ discard block |
||
93 | 95 | |
94 | 96 | $query = $dbc->query("SELECT droit_acces FROM droit_acces WHERE page LIKE '%$page%'"); |
95 | 97 | if ((is_array($query)) && (count($query) > 0)) { |
96 | - foreach ($query as $obj) $droit_acces = $obj->droit_acces; |
|
98 | + foreach ($query as $obj) { |
|
99 | + $droit_acces = $obj->droit_acces; |
|
100 | + } |
|
97 | 101 | } |
98 | 102 | |
99 | 103 | return $droit_acces; |
@@ -143,8 +147,7 @@ discard block |
||
143 | 147 | |
144 | 148 | if (($this->super_admin == 1) || (in_array($this->getListeDroitPage($page), $this->getListeDroitAcces()))|| (in_array($page, $all_access))) { |
145 | 149 | return true; |
146 | - } |
|
147 | - else { |
|
150 | + } else { |
|
148 | 151 | return false; |
149 | 152 | } |
150 | 153 | } |
@@ -169,8 +172,7 @@ discard block |
||
169 | 172 | //si les trois sont différent de 0 on renvoit true soinon false |
170 | 173 | if (($this->super_admin == 1) || ((in_array($droit, $liste_droit_acces)) && in_array(1, $array_modif))) { |
171 | 174 | return true; |
172 | - } |
|
173 | - else { |
|
175 | + } else { |
|
174 | 176 | return false; |
175 | 177 | } |
176 | 178 | } |
@@ -185,8 +187,7 @@ discard block |
||
185 | 187 | |
186 | 188 | if (($this->super_admin == 1) || (in_array($droit_acces, $liste_droit_acces))) { |
187 | 189 | return true; |
188 | - } |
|
189 | - else { |
|
190 | + } else { |
|
190 | 191 | return false; |
191 | 192 | } |
192 | 193 | } |