@@ -15,8 +15,7 @@ discard block |
||
| 15 | 15 | public function getParse($file) { |
| 16 | 16 | if (file_exists($file)) { |
| 17 | 17 | return parse_ini_file($file); |
| 18 | - } |
|
| 19 | - else { |
|
| 18 | + } else { |
|
| 20 | 19 | return false; |
| 21 | 20 | } |
| 22 | 21 | } |
@@ -34,8 +33,7 @@ discard block |
||
| 34 | 33 | public function setModifierConfigIni($developpement, $dev_info, $prod_info) { |
| 35 | 34 | if ($developpement == "on") { |
| 36 | 35 | $developpement = 1; |
| 37 | - } |
|
| 38 | - else { |
|
| 36 | + } else { |
|
| 39 | 37 | $developpement = 0; |
| 40 | 38 | } |
| 41 | 39 | |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | $params = $obj->mdp_params; |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | - } |
|
| 32 | - else { |
|
| 31 | + } else { |
|
| 33 | 32 | $params = self::$params; |
| 34 | 33 | } |
| 35 | 34 | |
@@ -81,8 +80,7 @@ discard block |
||
| 81 | 80 | |
| 82 | 81 | if ($id_identite != null) { |
| 83 | 82 | self::setSaveParams("$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20), $id_identite); |
| 84 | - } |
|
| 85 | - else { |
|
| 83 | + } else { |
|
| 86 | 84 | self::$params = "$taille_bout1, $debut_bout2, $nb_aleatoire_mdp, $taille_bout2, $debut_bout1, ".ChaineCaractere::random(20); |
| 87 | 85 | } |
| 88 | 86 | |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | if (isset($_POST['admin'])) { |
| 6 | 6 | \core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."administrator/login", WEBROOT."administrator", 0); |
| 7 | - } |
|
| 8 | - else { |
|
| 7 | + } else { |
|
| 9 | 8 | \core\auth\Connexion::setLogin($pseudo, $mdp, WEBROOT."login", WEBROOT."index.php", 0); |
| 10 | 9 | } |
| 11 | 10 | \ No newline at end of file |
@@ -13,20 +13,17 @@ |
||
| 13 | 13 | if ($membre->getErreur() != "") { |
| 14 | 14 | FlashMessage::setFlash($membre->getErreur()); |
| 15 | 15 | header("location:".ADMWEBROOT."configuration/mon-compte"); |
| 16 | - } |
|
| 17 | - else { |
|
| 16 | + } else { |
|
| 18 | 17 | \core\auth\Connexion::setDeconnexion(WEBROOT."administrator/login"); |
| 19 | 18 | FlashMessage::setFlash("Votre mot de passe a été changé avec succès, vous pouvez vous reconnecter avec votre nouveau mot de passe", "info"); |
| 20 | 19 | } |
| 21 | - } |
|
| 22 | - else { |
|
| 20 | + } else { |
|
| 23 | 21 | $membre->setMdp($mdp, $new_mdp, $verif_new_mdp); |
| 24 | 22 | |
| 25 | 23 | if ($membre->getErreur() != "") { |
| 26 | 24 | FlashMessage::setFlash($membre->getErreur()); |
| 27 | 25 | header("location:index.php"); |
| 28 | - } |
|
| 29 | - else { |
|
| 26 | + } else { |
|
| 30 | 27 | \core\auth\Connexion::setDeconnexion("index.php?page=login"); |
| 31 | 28 | FlashMessage::setFlash("Votre mot de passe a été changé avec succès, vous pouvez vous reconnecter avec votre nouveau mot de passe", "info"); |
| 32 | 29 | } |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | if ($no_module === null) { |
| 23 | 23 | $query = $dbc->select()->from("navigation")->orderBy("ordre")->get(); |
| 24 | - } |
|
| 25 | - else { |
|
| 24 | + } else { |
|
| 26 | 25 | $query = $dbc->select()->from("navigation")->where("ID_page", " IS NOT ", "NULL", "", true)->orderBy("ordre")->get(); |
| 27 | 26 | } |
| 28 | 27 | |
@@ -30,8 +29,7 @@ discard block |
||
| 30 | 29 | foreach ($query as $obj) { |
| 31 | 30 | if ($obj->ID_page === null) { |
| 32 | 31 | $navigation[] = $this->getLienNavigationModule($obj->ID_module); |
| 33 | - } |
|
| 34 | - else { |
|
| 32 | + } else { |
|
| 35 | 33 | $navigation[] = $this->getLienNavigationPage($obj->ID_page); |
| 36 | 34 | } |
| 37 | 35 | $last_ordre = $obj->ordre; |
@@ -138,8 +136,7 @@ discard block |
||
| 138 | 136 | private function getLienPage($url) { |
| 139 | 137 | if (ChaineCaractere::FindInString($url, "http://")) { |
| 140 | 138 | return $url; |
| 141 | - } |
|
| 142 | - else { |
|
| 139 | + } else { |
|
| 143 | 140 | return WEBROOT.$url; |
| 144 | 141 | } |
| 145 | 142 | } |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | |
| 8 | 8 | if ($validator->getErrors() !== null) { |
| 9 | 9 | \core\HTML\flashmessage\FlashMessage::setFlash($validator->getErrors()); |
| 10 | - } |
|
| 11 | - else { |
|
| 10 | + } else { |
|
| 12 | 11 | $type = $_POST["type"]; |
| 13 | 12 | $objet = $_POST['objet']." de la part de ".$_SERVER['HTTP_HOST']; |
| 14 | 13 | $demande = $_POST['demande']; |
@@ -30,8 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | if (((is_array($query)) && (count($query) > 0)) || ($controller !== false)) { |
| 32 | 32 | return true; |
| 33 | - } |
|
| 34 | - else { |
|
| 33 | + } else { |
|
| 35 | 34 | $router = new RouterModule(); |
| 36 | 35 | |
| 37 | 36 | if ($router->getRouteModuleExist($url) !== true) { |
@@ -1,5 +1,7 @@ discard block |
||
| 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 |
@@ -46,15 +48,13 @@ discard block |
||
| 46 | 48 | if (($ini["installation"] == 1) && ($page_root != "installation.php")) { |
| 47 | 49 | header("location:".WEBROOT."installation-ribs"); |
| 48 | 50 | } |
| 49 | - } |
|
| 50 | - else { |
|
| 51 | + } else { |
|
| 51 | 52 | header("location:".WEBROOT."installation"); |
| 52 | 53 | } |
| 53 | 54 | |
| 54 | 55 | if ($ini["developpment"] == 1) { |
| 55 | 56 | $tab = "dev"; |
| 56 | - } |
|
| 57 | - else { |
|
| 57 | + } else { |
|
| 58 | 58 | $tab = "prod"; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | if ((isset($_GET['page'])) && ($_GET['page'] != null)) { |
| 36 | 36 | $page = $_GET['page']; |
| 37 | 37 | $contenu->getHeadPage(0, $page); |
| 38 | - } |
|
| 39 | - else { |
|
| 38 | + } else { |
|
| 40 | 39 | $contenu->getHeadPage(1); |
| 41 | 40 | } |
| 42 | 41 | |
@@ -70,17 +69,14 @@ discard block |
||
| 70 | 69 | //si c'est un controleur de base on va cerhcer dans core/admin |
| 71 | 70 | if ($core !== false) { |
| 72 | 71 | require_once(ROOT.$lien.".php"); |
| 73 | - } |
|
| 74 | - else if ($module !== false) { |
|
| 72 | + } else if ($module !== false) { |
|
| 75 | 73 | $explode = explode("/", $lien, 3); |
| 76 | 74 | |
| 77 | 75 | require_once(ROOT.$explode[0]."/".$explode[1]."/app/controller/".$explode[2].".php"); |
| 78 | - } |
|
| 79 | - else { |
|
| 76 | + } else { |
|
| 80 | 77 | require_once("app/controller/".$lien.".php"); |
| 81 | 78 | } |
| 82 | - } |
|
| 83 | - else { |
|
| 79 | + } else { |
|
| 84 | 80 | $cache = new \core\Cache($page); |
| 85 | 81 | |
| 86 | 82 | $router_module = new RouterModule(); |
@@ -95,8 +91,7 @@ discard block |
||
| 95 | 91 | $twig = new Twig_Environment($loader); |
| 96 | 92 | |
| 97 | 93 | $page = $router_module->getPage(); |
| 98 | - } |
|
| 99 | - else { |
|
| 94 | + } else { |
|
| 100 | 95 | $contenu->getContenuPage(); |
| 101 | 96 | $contenu_page = $contenu->getContenu(); |
| 102 | 97 | |
@@ -119,8 +114,7 @@ discard block |
||
| 119 | 114 | } |
| 120 | 115 | $cache->setEnd(); |
| 121 | 116 | } |
| 122 | - } |
|
| 123 | - else { |
|
| 117 | + } else { |
|
| 124 | 118 | $contenu->getContenuPage(); |
| 125 | 119 | $contenu_page = $contenu->getContenu(); |
| 126 | 120 | |