@@ -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 | |
@@ -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() { |
@@ -177,7 +177,9 @@ |
||
| 177 | 177 | $dbc = App::getDb(); |
| 178 | 178 | $query = $dbc->select("last_change_mdp")->from("identite")->where("ID_identite", "=", $id_identite)->get(); |
| 179 | 179 | if ((is_array($query)) && (count($query) > 0)) { |
| 180 | - foreach ($query as $obj) return $obj->last_change_mdp; |
|
| 180 | + foreach ($query as $obj) { |
|
| 181 | + return $obj->last_change_mdp; |
|
| 182 | + } |
|
| 181 | 183 | } |
| 182 | 184 | } |
| 183 | 185 | |