Passed
Push — master ( 1c5a7a...282f2b )
by Anthony
04:57
created
admin.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
 	if (isset($_GET['page'])) {
36 36
 		$titre_page = "Administration du site";
37 37
 		$description_page = "Administration du site";
38
-	}
39
-	else {
38
+	} else {
40 39
 		$titre_page = "Administration du site";
41 40
 		$description_page = "Administration du site";
42 41
 	}
@@ -66,25 +65,21 @@  discard block
 block discarded – undo
66 65
 			//si c'est un controleur de base on va cerhcer dans core/admin
67 66
 			if ($core !== false) {
68 67
 				require_once(ROOT.$lien.".php");
69
-			}
70
-			else if ($module !== false) {
68
+			} else if ($module !== false) {
71 69
 				$explode = explode("/", $lien, 3);
72 70
 
73 71
 				require_once(ROOT.$explode[0]."/".$explode[1]."/admin/controller/".$explode[2].".php");
74
-			}
75
-			else {
72
+			} else {
76 73
 				require_once("admin/controller/".$lien.".php");
77 74
 			}
78 75
 		}
79 76
 		//pour la page de login
80 77
 		else if ($page == "login") {
81 78
 			require("admin/views/template/login_admin.php");
82
-		}
83
-		else {
79
+		} else {
84 80
 			if (!isset($_SESSION["idlogin".CLEF_SITE])) {
85 81
 				Connexion::setObgConnecte(WEBROOT."administrator/login");
86
-			}
87
-			else {
82
+			} else {
88 83
 				if (\core\functions\ChaineCaractere::FindInString($page, "modules/") == true) {
89 84
 					//utilisé pour initialiser les modules
90 85
 					$page_module = $page;
@@ -99,8 +94,7 @@  discard block
 block discarded – undo
99 94
 				if (($droit_acces->getDroitAccesPage("gestion-comptes/index") == false) && ($page == "gestion-comptes")) {
100 95
 					FlashMessage::setFlash("L'accès à cette page n'est pas activé, veuillez contacter votre administrateur pour y avoir accès");
101 96
 					header("location:".WEBROOT."administrator");
102
-				}
103
-				else if (($droit_acces->getDroitAccesPage("gestion-droits-acces/index") == false) && ($page == "gestion-droits-acces")) {
97
+				} else if (($droit_acces->getDroitAccesPage("gestion-droits-acces/index") == false) && ($page == "gestion-droits-acces")) {
104 98
 					FlashMessage::setFlash("L'accès à cette page n'est pas activé, veuillez contacter votre administrateur pour y avoir accès");
105 99
 					header("location:".WEBROOT."administrator");
106 100
 				}
@@ -108,8 +102,7 @@  discard block
 block discarded – undo
108 102
 				if (($droit_acces->getDroitAccesPage($page) == false) && (!isset($page_module))) {
109 103
 					FlashMessage::setFlash("Vous n'avez pas les droits pour accéder à cette page, contacter votre gérant pour y avoir accès");
110 104
 					header("location:".WEBROOT."administrator");
111
-				}
112
-				else {
105
+				} else {
113 106
 					$cache = new \core\Cache($page, 1);
114 107
 					$admin = new Admin($_SESSION["idlogin".CLEF_SITE]);
115 108
 
@@ -121,14 +114,12 @@  discard block
 block discarded – undo
121 114
 				}
122 115
 			}
123 116
 		}
124
-	}
125
-	else {
117
+	} else {
126 118
 		Connexion::setObgConnecte(WEBROOT."administrator/login");
127 119
 
128 120
 		if (!isset($_SESSION["idlogin".CLEF_SITE])) {
129 121
 			Connexion::setObgConnecte(WEBROOT."administrator/login");
130
-		}
131
-		else {
122
+		} else {
132 123
 			$page = "index";
133 124
 			$admin = new Admin($_SESSION["idlogin".CLEF_SITE]);
134 125
 			require(ROOT."admin/controller/initialise_all.php");
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
@@ -98,8 +94,7 @@  discard block
 block discarded – undo
98 94
 				echo("<pre>");
99 95
 				print_r($arr);
100 96
 				echo("</pre>");
101
-			}
102
-			else {
97
+			} else {
103 98
 				$contenu->getContenuPage();
104 99
 				$contenu_page = $contenu->getContenu();
105 100
 
@@ -122,8 +117,7 @@  discard block
 block discarded – undo
122 117
 			}
123 118
 			$cache->setEnd();
124 119
 		}
125
-	}
126
-	else {
120
+	} else {
127 121
 		$contenu->getContenuPage();
128 122
 		$contenu_page = $contenu->getContenu();
129 123
 
Please login to merge, or discard this patch.
admin/views/template/principal.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 		<link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>reset_css/reset.css">
10 10
 		<link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/style.css">
11 11
 		<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
12
-		<?php require_once(ROOT."admin/views/template/js/menu.php");?>
12
+		<?php require_once(ROOT."admin/views/template/js/menu.php"); ?>
13 13
 
14 14
 		<!-- Les librairies utlisées -->
15 15
 		<link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>popup/css/style.css">
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	</head>
20 20
 	<?=\core\HTML\flashmessage\FlashMessage::getFlash(); ?>
21 21
 	<body>
22
-		<nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif;?>">
22
+		<nav class="menu <?php if (($_SESSION["menu_plie".CLEF_SITE] == "deplie") || (!isset($_SESSION["menu_plie".CLEF_SITE]))):?>active<?php endif; ?>">
23 23
 			<div class="titre">
24 24
 				<h1>Ribs V2.3.5.6</h1>
25 25
 				<i class="fa fa-bars"></i>
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 										<a href="<?=ADMWEBROOT?>notifications"><i class="fa fa-bell  <?php if ($admin->getNotification() == 1):?> animated infinite swing<?php endif; ?>"></i></a>
42 42
 									</div>
43 43
 								</div>
44
-							<?php endif;?>
44
+							<?php endif; ?>
45 45
 							<?php if (($droit_acces->getSuperAdmin() == 1) || ($droit_acces->getDroitAccesPage("configuration/mon-compte"))):?>
46 46
 								<div class="colonne">
47 47
 									<div class="config">
48 48
 										<a href="<?=ADMWEBROOT?>configuration/index"><i class="fa fa-gear"></i></a>
49 49
 									</div>
50 50
 								</div>
51
-							<?php endif;?>
51
+							<?php endif; ?>
52 52
 							<div class="colonne">
53 53
 								<div class="logout">
54 54
 									<a href="<?=WEBROOT?>administrator/controller/core/auth/connexion/logout"><i class="fa fa-sign-out animated activate swing infinite"></i></a>
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 							<ul>
68 68
 								<?php if ($droit_acces->getDroitAccesAction("CREATION COMPTE ADMIN")):?>
69 69
 									<li><i class="fa fa-user"></i><a href="<?=ADMWEBROOT?>gestion-comptes/creer-utilisateur">Créer un utilisateur</a></li>
70
-								<?php endif;?>
70
+								<?php endif; ?>
71 71
 							</ul>
72 72
 						</li>
73 73
 					<?php endif; ?>
Please login to merge, or discard this patch.
admin/views/gestion-contenus/inline.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 <button id="supprimer-page-contenu" type="button" class="submit-contenu supprimer-page supprimer open-popup" popup="supprimer-page" href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page_courante?>"><i class="fa fa-times"></i>Annuler</button>
18 18
 
19 19
 
20
-<?php if ($config->getResponsive() == 1){?>
20
+<?php if ($config->getResponsive() == 1) {?>
21 21
 	<link rel="stylesheet" type="text/css" href="<?=WEBROOT?>admin/views/template/css/foundation-inline.css">
22 22
 <?php }?>
23 23
 <link rel="stylesheet" type="text/css" href="<?=TPLWEBROOT?>css/page.css">
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 <script>
34 34
 	CKEDITOR.disableAutoInline = true;
35 35
 
36
-	<?php for($i=0 ; $i<$bloc_editable ; $i++):?>
36
+	<?php for ($i = 0; $i < $bloc_editable; $i++):?>
37 37
 		$(document).ready(function() {
38 38
 			console.log("editor<?=$i?>");
39 39
 			$("#editor<?=$i?>").attr("contenteditable", true);
40 40
 		})
41 41
 		var editor<?=$i?> = CKEDITOR.inline("editor<?=$i?>", { customConfig: "<?=WEBROOT?>config/config_ckeditor.js" });
42 42
 		CKFinder.setupCKEditor( editor<?=$i?>, "<?=LIBSWEBROOT?>ckfinder/" );
43
-	<?php endfor;?>
43
+	<?php endfor; ?>
44 44
 </script>
45
-<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php");?>
46 45
\ No newline at end of file
46
+<?php require_once(ROOT."admin/views/gestion-contenus/js/inline.php"); ?>
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
admin/controller/ckeditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
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
\ No newline at end of file
Please login to merge, or discard this patch.
admin/controller/initialise_all.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
 			$acces_admin = $_SESSION['acces_admin'];
37 37
 
38 38
 			unset($_SESSION['err_ajout_utilisateur']);
39
-		}
40
-		else {
39
+		} else {
41 40
 			$nom = null;
42 41
 			$prenom = null;
43 42
 			$pseudo = null;
@@ -63,8 +62,7 @@  discard block
 block discarded – undo
63 62
 			$parent_courant = $_SESSION['parent'];
64 63
 
65 64
 			unset($_SESSION['err_modification_contenu']);
66
-		}
67
-		else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
65
+		} else if (($page == "gestion-contenus/modifier-contenu") || ($page == "gestion-contenus/inline")) {
68 66
 			$id_page_courante = $_GET['id'];
69 67
 
70 68
 			$contenu->getHeadPage($id_page_courante);
@@ -78,8 +76,7 @@  discard block
 block discarded – undo
78 76
 			$texte_parent_courant = $gestion_contenu->getParentTexte($parent_courant);
79 77
 			$contenu_page = $contenu->getContenu();
80 78
 			$bloc_editable = $gestion_contenu->getBlocEditable($id_page_courante);
81
-		}
82
-		else {
79
+		} else {
83 80
 			$balise_title = null;
84 81
 			$url = null;
85 82
 			$meta_description = null;
@@ -117,8 +114,7 @@  discard block
 block discarded – undo
117 114
 			$contenu_dynamique = $config->getContenusDynamique();
118 115
 			$responsive = $config->getResponsive();
119 116
 			$cache_config = $config->getCache();
120
-		}
121
-		else {
117
+		} else {
122 118
 			$config = new \core\Configuration();
123 119
 			$nom_site = $config->getNomSite();
124 120
 			$url_site = $config->getUrlSite();
@@ -154,8 +150,7 @@  discard block
 block discarded – undo
154 150
 			$db_host_prod = $_SESSION["db_host_prod"];
155 151
 
156 152
 			unset($_SESSION['err_modification_configini']);
157
-		}
158
-		else {
153
+		} else {
159 154
 			$developpement = $ini["developpment"];
160 155
 
161 156
 			$db_type_dev = $ini["dev"]["DB_TYPE"];
Please login to merge, or discard this patch.
core/Cache.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
 					$this->reload_cache = $obj->reload_cache;
61 61
 					$this->no_cache = $obj->no_cache;
62 62
 				}
63
-			}
64
-			else {
63
+			} else {
65 64
 				$dbc->insert("nom_fichier", $this->page)->insert("reload_cache", 0)->into("cache")->set();
66 65
 
67 66
 				$this->reload_cache = 0;
@@ -107,16 +106,14 @@  discard block
 block discarded – undo
107 106
 					require_once($this->chemin_cache);
108 107
 
109 108
 					return true;
110
-				}
111
-				else {
109
+				} else {
112 110
 					if ($this->no_cache == null) {
113 111
 						ob_start();
114 112
 					}
115 113
 
116 114
 					return false;
117 115
 				}
118
-			}
119
-			else {
116
+			} else {
120 117
 				return false;
121 118
 			}
122 119
 		}
Please login to merge, or discard this patch.
core/HTML/flashmessage/FlashMessage.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 					//definit le chemin sachant que l'on part de index.php
45 45
 					$chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
46 46
 				}
47
-				else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
47
+				else if (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
48 48
 					//definit le chemin sachant que l'on part de admin.php
49 49
 					$chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
50 50
 				}
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,11 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 			if ($type == "error") {
19 19
 				$icone = "<i class='fa fa-close'></i>";
20
-			}
21
-			else if ($type == "success") {
20
+			} else if ($type == "success") {
22 21
 				$icone = "<i class='fa fa-check'></i>";
23
-			}
24
-			else {
22
+			} else {
25 23
 				$icone = "<i class='fa fa-info'></i>";
26 24
 			}
27 25
 
@@ -43,12 +41,10 @@  discard block
 block discarded – undo
43 41
 				if (strstr($_SERVER['SCRIPT_NAME'], "index.php")) {
44 42
 					//definit le chemin sachant que l'on part de index.php
45 43
 					$chemin = str_replace("\\", "/", str_replace("index.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
46
-				}
47
-				else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
44
+				} else if  (strstr($_SERVER['SCRIPT_NAME'], "installation.php")) {
48 45
 					//definit le chemin sachant que l'on part de admin.php
49 46
 					$chemin = str_replace("\\", "/", str_replace("installation.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
50
-				}
51
-				else {
47
+				} else {
52 48
 					//definit le chemin sachant que l'on part de admin.php
53 49
 					$chemin = str_replace("\\", "/", str_replace("admin.php", "", $_SERVER['SCRIPT_NAME']).__NAMESPACE__."/view/");
54 50
 				}
Please login to merge, or discard this patch.
core/modules/GestionModule.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@  discard block
 block discarded – undo
124 124
 				foreach ($query as $obj) {
125 125
 					if ($obj->activer == 1) {
126 126
 						return true;
127
-					}
128
-					else {
127
+					} else {
129 128
 						return false;
130 129
 					}
131 130
 				}
@@ -172,8 +171,7 @@  discard block
 block discarded – undo
172 171
 
173 172
 			if ($activer == 1) {
174 173
 				$nav->setAjoutLien("ID_module", self::getUrlToId($url));
175
-			}
176
-			else {
174
+			} else {
177 175
 				$nav->setSupprimerLien("ID_module", self::getUrlToId($url));
178 176
 			}
179 177
 		}
Please login to merge, or discard this patch.