@@ -87,12 +87,10 @@ discard block |
||
87 | 87 | if ((strlen($new_pseudo) < 5) || (strlen($new_pseudo) > 15)) { |
88 | 88 | $err = "Votre pseudo doit être entre 5 et 15 caractères"; |
89 | 89 | $this->erreur = $err; |
90 | - } |
|
91 | - else if ($dbc->rechercherEgalite("identite", "pseudo", $new_pseudo) == false) { |
|
90 | + } else if ($dbc->rechercherEgalite("identite", "pseudo", $new_pseudo) == false) { |
|
92 | 91 | $err = "Ce pseudo est déjà utilisé, veuillez en choisir un autre"; |
93 | 92 | $this->erreur = $err; |
94 | - } |
|
95 | - else { |
|
93 | + } else { |
|
96 | 94 | $dbc->update("pseudo", $new_pseudo)->from("identite")->where("ID_identite", "=", $_SESSION["idlogin".CLEF_SITE])->set(); |
97 | 95 | $this->pseudo = $new_pseudo; |
98 | 96 | } |
@@ -112,12 +110,10 @@ discard block |
||
112 | 110 | if (md5($old_mdp) != $mdp) { |
113 | 111 | $err = "Votre mot de passe est incorrect"; |
114 | 112 | $this->erreur = $err; |
115 | - } |
|
116 | - else if ($new_mdp != $verif_new_mdp) { |
|
113 | + } else if ($new_mdp != $verif_new_mdp) { |
|
117 | 114 | $err = "Vos mots de passe sont différents"; |
118 | 115 | $this->erreur = $err; |
119 | - } |
|
120 | - else { |
|
116 | + } else { |
|
121 | 117 | $mdpok = Encrypt::setEncryptMdp($new_mdp, $this->id_identite); |
122 | 118 | //le nouveau mdp est bon on update |
123 | 119 | $dbc->update("mdp", $mdpok)->from("identite")->where("ID_identite", "=", $this->id_identite)->set(); |
@@ -22,8 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | if (isset($datas[$i][2])) { |
24 | 24 | $this->$function($datas[$i][1], $datas[$i][2]); |
25 | - } |
|
26 | - else { |
|
25 | + } else { |
|
27 | 26 | $this->$function($datas[$i][1]); |
28 | 27 | } |
29 | 28 | } |
@@ -56,8 +55,7 @@ discard block |
||
56 | 55 | protected function getTestRequired($value) { |
57 | 56 | if (($value == "") || ($value == null) || (strlen($value) == 0)) { |
58 | 57 | return false; |
59 | - } |
|
60 | - else { |
|
58 | + } else { |
|
61 | 59 | return true; |
62 | 60 | } |
63 | 61 | } |
@@ -70,8 +68,7 @@ discard block |
||
70 | 68 | protected function getTestLongueur($value, $longeur) { |
71 | 69 | if (strlen($value) > $longeur) { |
72 | 70 | return true; |
73 | - } |
|
74 | - else { |
|
71 | + } else { |
|
75 | 72 | return false; |
76 | 73 | } |
77 | 74 | } |
@@ -83,8 +80,7 @@ discard block |
||
83 | 80 | protected function getTestInt($value) { |
84 | 81 | if (is_numeric($value)) { |
85 | 82 | return true; |
86 | - } |
|
87 | - else { |
|
83 | + } else { |
|
88 | 84 | return false; |
89 | 85 | } |
90 | 86 | } |
@@ -102,12 +98,10 @@ discard block |
||
102 | 98 | if (($required != null) && ($this->getTestRequired($value) === false)) { |
103 | 99 | $this->erreur .= "<li>$erreur</li>"; |
104 | 100 | return false; |
105 | - } |
|
106 | - else if (($value != "") && ($this->getTestLongueur($value, 2) === false)) { |
|
101 | + } else if (($value != "") && ($this->getTestLongueur($value, 2) === false)) { |
|
107 | 102 | $this->erreur .= "<li>$erreur_long</li>"; |
108 | 103 | return false; |
109 | - } |
|
110 | - else { |
|
104 | + } else { |
|
111 | 105 | $this->$varaible = $value; |
112 | 106 | return true; |
113 | 107 | } |
@@ -155,8 +149,7 @@ discard block |
||
155 | 149 | protected function setVerifRetapeMdp($value) { |
156 | 150 | if ($this->mdp == $value) { |
157 | 151 | return true; |
158 | - } |
|
159 | - else { |
|
152 | + } else { |
|
160 | 153 | $this->erreur .= "<li>Les mots de passent ne correspondent pas</li>"; |
161 | 154 | $this->mdp = null; |
162 | 155 | return false; |
@@ -186,12 +179,10 @@ discard block |
||
186 | 179 | if (($required != null) && ($this->getTestRequired($value) === false)) { |
187 | 180 | $this->erreur .= "<li>Le champs E-mail ne peut pas être vide</li>"; |
188 | 181 | return false; |
189 | - } |
|
190 | - else if (!$validator->isValid($value)) { |
|
182 | + } else if (!$validator->isValid($value)) { |
|
191 | 183 | $this->erreur .= "<li>Le champs E-mail doit être une adresse E-mail valide</li>"; |
192 | 184 | return false; |
193 | - } |
|
194 | - else { |
|
185 | + } else { |
|
195 | 186 | $this->mail = $value; |
196 | 187 | return true; |
197 | 188 | } |
@@ -19,8 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | if ($no_module === null) { |
21 | 21 | $query = $dbc->select()->from("navigation")->orderBy("ordre")->get(); |
22 | - } |
|
23 | - else { |
|
22 | + } else { |
|
24 | 23 | $query = $dbc->select()->from("navigation")->where("ID_page", " IS NOT ", "NULL", "", true)->orderBy("ordre")->get(); |
25 | 24 | } |
26 | 25 | |
@@ -28,8 +27,7 @@ discard block |
||
28 | 27 | foreach ($query as $obj) { |
29 | 28 | if ($obj->ID_page === null) { |
30 | 29 | $navigation[] = $this->getLienNavigationModule($obj->ID_module); |
31 | - } |
|
32 | - else { |
|
30 | + } else { |
|
33 | 31 | $navigation[] = $this->getLienNavigationPage($obj->ID_page); |
34 | 32 | } |
35 | 33 | $last_ordre = $obj->ordre; |
@@ -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) { |
@@ -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 |
@@ -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) { |
@@ -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 |
@@ -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']; |
@@ -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 |