@@ -50,29 +50,29 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | //-------------------------- GETTER ----------------------------------------------------------------------------// |
53 | - public function getLogged(){ |
|
53 | + public function getLogged() { |
|
54 | 54 | return $this->logged; |
55 | 55 | } |
56 | - public function getSuperAdmin(){ |
|
56 | + public function getSuperAdmin() { |
|
57 | 57 | return $this->super_admin; |
58 | 58 | } |
59 | 59 | |
60 | 60 | //pour la table liste_droit_acces |
61 | - public function getIdListeDroitAcces(){ |
|
61 | + public function getIdListeDroitAcces() { |
|
62 | 62 | return $this->id_liste_droit_acces; |
63 | 63 | } |
64 | 64 | |
65 | 65 | //pour les droits sur la gestion des contenus |
66 | - public function getModifSeo(){ |
|
66 | + public function getModifSeo() { |
|
67 | 67 | return $this->modif_seo; |
68 | 68 | } |
69 | - public function getModifContenu(){ |
|
69 | + public function getModifContenu() { |
|
70 | 70 | return $this->modif_contenu; |
71 | 71 | } |
72 | - public function getModifNavigation(){ |
|
72 | + public function getModifNavigation() { |
|
73 | 73 | return $this->modif_navigation; |
74 | 74 | } |
75 | - public function getSupprimerPage(){ |
|
75 | + public function getSupprimerPage() { |
|
76 | 76 | return $this->supprimer_page; |
77 | 77 | } |
78 | 78 |
@@ -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 |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * pour intialiser la ou les clauses where d'une requete |
249 | 249 | */ |
250 | 250 | public function where($champ, $cond, $champ_test, $closure = null) { |
251 | - if ( $closure === null) { |
|
251 | + if ($closure === null) { |
|
252 | 252 | $this->conditions[] = $champ.$cond.$champ_test; |
253 | 253 | } |
254 | 254 | else { |
@@ -264,10 +264,10 @@ discard block |
||
264 | 264 | * fonction qui permet de récupérer un select fait sur une table |
265 | 265 | */ |
266 | 266 | public function get() { |
267 | - $requete = $this->req_beginning . implode(",", $this->champs) . " FROM " . implode(",", $this->table); |
|
267 | + $requete = $this->req_beginning.implode(",", $this->champs)." FROM ".implode(",", $this->table); |
|
268 | 268 | |
269 | 269 | if (!empty($this->conditions)) { |
270 | - $requete .= " WHERE ". implode(" ", $this->conditions); |
|
270 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | $this->unsetQueryBuilder(); |
@@ -282,15 +282,15 @@ discard block |
||
282 | 282 | |
283 | 283 | $datas = []; |
284 | 284 | $count = count($this->champs); |
285 | - for ($i=0 ; $i<$count ; $i++) { |
|
285 | + for ($i = 0; $i < $count; $i++) { |
|
286 | 286 | $datas[] = $this->champs[$i]."=:".$this->champs[$i]; |
287 | 287 | } |
288 | 288 | |
289 | 289 | //si on a des conditions alors on sera dans un insert |
290 | - $requete = $this->req_beginning . implode(",", $this->table) . " SET " . implode(", ", $datas); |
|
290 | + $requete = $this->req_beginning.implode(",", $this->table)." SET ".implode(", ", $datas); |
|
291 | 291 | |
292 | 292 | if (!empty($this->conditions)) { |
293 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
293 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | $this->prepare($requete, $values); |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | * fonction utilisée pour finir un delete |
302 | 302 | */ |
303 | 303 | public function del() { |
304 | - $requete = $this->req_beginning . implode(",", $this->table); |
|
304 | + $requete = $this->req_beginning.implode(",", $this->table); |
|
305 | 305 | |
306 | 306 | if (!empty($this->conditions)) { |
307 | - $requete .= " WHERE " . implode(" ", $this->conditions); |
|
307 | + $requete .= " WHERE ".implode(" ", $this->conditions); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | $this->query($requete); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use core\HTML\flashmessage\FlashMessage; |
5 | 5 | use PDO; |
6 | 6 | |
7 | - class Database extends Querybuilder{ |
|
7 | + class Database extends Querybuilder { |
|
8 | 8 | private $db_type; |
9 | 9 | private $db_name; |
10 | 10 | private $db_user; |