@@ -16,7 +16,9 @@ |
||
16 | 16 | $query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get(); |
17 | 17 | |
18 | 18 | if ((is_array($query)) && (count($query) > 0)) { |
19 | - foreach ($query as $obj) $this->parent_texte = $obj->titre; |
|
19 | + foreach ($query as $obj) { |
|
20 | + $this->parent_texte = $obj->titre; |
|
21 | + } |
|
20 | 22 | } |
21 | 23 | |
22 | 24 | return $this->parent_texte; |
@@ -28,8 +28,7 @@ |
||
28 | 28 | $this->dbc = new \PDO($this->db_type.':host='.$this->db_host.';dbname='.$this->db_name, $this->db_user, $this->db_pass); |
29 | 29 | |
30 | 30 | $this->setinstallbdd(); |
31 | - } |
|
32 | - catch (\PDOException $e) { |
|
31 | + } catch (\PDOException $e) { |
|
33 | 32 | //on tente de créer la bdd |
34 | 33 | $erreur = "getErreur".$e->getCode(); |
35 | 34 | $this->$erreur(); |
@@ -91,7 +91,9 @@ |
||
91 | 91 | </div> |
92 | 92 | |
93 | 93 | <?php |
94 | - if (!isset($arr)) $arr = []; |
|
94 | + if (!isset($arr)) { |
|
95 | + $arr = []; |
|
96 | + } |
|
95 | 97 | //echo $twig->render("template/left-navigation.html", array_merge(array_merge(array_merge(array_merge($arr, $constant), $_REQUEST), $_SESSION), $arr_admin)); |
96 | 98 | ?> |
97 | 99 |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | - if (!isset($page_root)) $page_root = "index.php"; |
|
2 | + if (!isset($page_root)) { |
|
3 | + $page_root = "index.php"; |
|
4 | + } |
|
3 | 5 | |
4 | 6 | //-------------------------- CONSTANTE POUR LES ROUTES ----------------------------------------------------------------------------// |
5 | 7 | //definit le chemin vers la racine du projet (depuis racine serveur web |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function getCache() { |
54 | 54 | return $this->cache; |
55 | 55 | } |
56 | - public function getDesactiverNavigation(){ |
|
56 | + public function getDesactiverNavigation() { |
|
57 | 57 | return $this->desactiver_navigation; |
58 | 58 | } |
59 | 59 |
@@ -75,7 +75,9 @@ |
||
75 | 75 | ->get(); |
76 | 76 | |
77 | 77 | if ((is_array($query)) && (count($query) > 0)) { |
78 | - foreach ($query as $obj) $liste_droit_acces[] = $obj->droit_acces; |
|
78 | + foreach ($query as $obj) { |
|
79 | + $liste_droit_acces[] = $obj->droit_acces; |
|
80 | + } |
|
79 | 81 | } |
80 | 82 | |
81 | 83 | App::setValues(["droit_acces_user" => $liste_droit_acces]); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use core\HTML\flashmessage\FlashMessage; |
6 | 6 | use core\Navigation; |
7 | 7 | |
8 | - class AdminNavigation extends Navigation{ |
|
8 | + class AdminNavigation extends Navigation { |
|
9 | 9 | |
10 | 10 | public function setOrdreNavigation($nav) { |
11 | 11 | $dbc = App::getDb(); |
@@ -60,7 +60,9 @@ |
||
60 | 60 | private function getParentId($parent) { |
61 | 61 | $dbc = \core\App::getDb(); |
62 | 62 | |
63 | - if ($parent == "") return 0; |
|
63 | + if ($parent == "") { |
|
64 | + return 0; |
|
65 | + } |
|
64 | 66 | |
65 | 67 | $query = $dbc->select("ID_page")->from("page")->where("titre", " LIKE ", '"%'.$parent.'%"', "", true)->get(); |
66 | 68 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function getPage() { |
24 | 24 | return $this->page; |
25 | 25 | } |
26 | - public function getModule(){ |
|
26 | + public function getModule() { |
|
27 | 27 | return $this->module; |
28 | 28 | } |
29 | 29 | public function getController() { |