@@ -2,6 +2,6 @@ |
||
2 | 2 | include_once(ROOT.'libs/ckeditor/ckeditor.php'); |
3 | 3 | require_once(ROOT.'libs/ckfinder/ckfinder.php'); |
4 | 4 | $ckeditor = new CKEditor(); |
5 | - $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
5 | + $ckeditor->basePath = WEBROOT.'libs/ckeditor/'; |
|
6 | 6 | CKFinder::SetupCKEditor($ckeditor, WEBROOT.'libs/ckfinder/'); |
7 | 7 | ?> |
8 | 8 | \ No newline at end of file |
@@ -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 { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * pour intialiser la ou les clauses where d'une requete |
112 | 112 | */ |
113 | 113 | public function where($champ, $cond, $champ_test, $closure = null) { |
114 | - if ( $closure === null) { |
|
114 | + if ($closure === null) { |
|
115 | 115 | $this->conditions[] = $champ.$cond.$champ_test; |
116 | 116 | } |
117 | 117 | else { |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | * fonction qui permet de récupérer un select fait sur une table |
128 | 128 | */ |
129 | 129 | public function get() { |
130 | - $requete = $this->req_beginning . implode(",", $this->champs) . " FROM " . implode(",", $this->table); |
|
130 | + $requete = $this->req_beginning.implode(",", $this->champs)." FROM ".implode(",", $this->table); |
|
131 | 131 | |
132 | 132 | if (!empty($this->conditions)) { |
133 | - $requete .= " WHERE ". implode(" ", $this->conditions); |
|
133 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | $this->unsetQueryBuilder(); |
@@ -145,15 +145,15 @@ discard block |
||
145 | 145 | |
146 | 146 | $datas = []; |
147 | 147 | $count = count($this->champs); |
148 | - for ($i=0 ; $i<$count ; $i++) { |
|
148 | + for ($i = 0; $i < $count; $i++) { |
|
149 | 149 | $datas[] = $this->champs[$i]."=:".$this->champs[$i]; |
150 | 150 | } |
151 | 151 | |
152 | 152 | //si on a des conditions alors on sera dans un insert |
153 | - $requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas); |
|
153 | + $requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas); |
|
154 | 154 | |
155 | 155 | if (!empty($this->conditions)) { |
156 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
156 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | $this->prepare($requete, $values); |
@@ -164,10 +164,10 @@ discard block |
||
164 | 164 | * fonction utilisée pour finir un delete |
165 | 165 | */ |
166 | 166 | public function del() { |
167 | - $requete = $this->req_beginning . implode(",", $this->table); |
|
167 | + $requete = $this->req_beginning.implode(",", $this->table); |
|
168 | 168 | |
169 | 169 | if (!empty($this->conditions)) { |
170 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
170 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | $this->query($requete); |
@@ -129,7 +129,7 @@ |
||
129 | 129 | |
130 | 130 | $dbc->prepare("INSERT INTO page (titre, contenu, url, meta_description, balise_title, ordre, parent, affiche) VALUES (:titre, :contenu, :url, :meta_description, :balise_title, :ordre, :parent, :affiche)", $value); |
131 | 131 | $this->id_page = $dbc->lastInsertId(); |
132 | - $this->setAjoutLienNavigation("ID_page", $this->id_page , 1); |
|
132 | + $this->setAjoutLienNavigation("ID_page", $this->id_page, 1); |
|
133 | 133 | } |
134 | 134 | else { |
135 | 135 | FlashMessage::setFlash("Impossible de créer cette page, veuillez réeseyer dans un moment. Si le problème persiste contactez votre administrateur."); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | if (is_array($query) && (count($query) > 0)) { |
52 | 52 | foreach ($query as $obj) { |
53 | - return [$obj->titre,$obj->url]; |
|
53 | + return [$obj->titre, $obj->url]; |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | if (is_array($query) && (count($query) > 0)) { |
71 | 71 | foreach ($query as $obj) { |
72 | - return [$obj->nom_module,$obj->url]; |
|
72 | + return [$obj->nom_module, $obj->url]; |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $dbc = App::getDb(); |
87 | 87 | |
88 | 88 | if ($afficher != null) { |
89 | - $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre+1)->into("navigation")->set(); |
|
89 | + $dbc->insert($id, $value_id)->insert("ordre", $this->last_ordre + 1)->into("navigation")->set(); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 |