Passed
Push — master ( 2488a8...c9802b )
by Anthony
03:12
created
admin/views/gestion-contenus/header.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@
 block discarded – undo
1 1
 <nav class="nav-page">
2 2
 	<div class="inner">
3 3
 		<ul>
4
-			<?php for ($i=0 ; $i<count($id_page) ; $i++): ?>
4
+			<?php for ($i = 0; $i < count($id_page); $i++): ?>
5 5
 				<?php if ($parent[$i] == 0): ?>
6 6
 					<li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page[$i]?>"><?=$titre[$i]?></a>
7 7
 						<ul>
8
-							<?php for ($j=0 ; $j<count($id_page) ; $j++): ?>
8
+							<?php for ($j = 0; $j < count($id_page); $j++): ?>
9 9
 								<?php if ($parent[$j] == $id_page[$i]): ?>
10 10
 									<li><a href="<?=ADMWEBROOT?>gestion-contenus/modifier-contenu?id=<?=$id_page[$j]?>"><?=$titre[$j]?></a></li>
11
-								<?php endif;?>
12
-							<?php endfor;?>
11
+								<?php endif; ?>
12
+							<?php endfor; ?>
13 13
 						</ul>
14 14
 					</li>
15
-				<?php endif;?>
16
-			<?php endfor;?>
15
+				<?php endif; ?>
16
+			<?php endfor; ?>
17 17
 		</ul>
18 18
 	</div>
19 19
 </nav>
Please login to merge, or discard this patch.
core/admin/droitsacces/DroitAcces.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,29 +50,29 @@
 block discarded – undo
50 50
     
51 51
     
52 52
         //-------------------------- GETTER ----------------------------------------------------------------------------//
53
-		public function getLogged(){
53
+		public function getLogged() {
54 54
 		    return $this->logged;
55 55
 		}
56
-		public function getSuperAdmin(){
56
+		public function getSuperAdmin() {
57 57
 		    return $this->super_admin;
58 58
 		}
59 59
 
60 60
 		//pour la table liste_droit_acces
61
-		public function getIdListeDroitAcces(){
61
+		public function getIdListeDroitAcces() {
62 62
 		    return $this->id_liste_droit_acces;
63 63
 		}
64 64
 
65 65
 		//pour les droits sur la gestion des contenus
66
-		public function getModifSeo(){
66
+		public function getModifSeo() {
67 67
 		    return $this->modif_seo;
68 68
 		}
69
-		public function getModifContenu(){
69
+		public function getModifContenu() {
70 70
 		    return $this->modif_contenu;
71 71
 		}
72
-		public function getModifNavigation(){
72
+		public function getModifNavigation() {
73 73
 		    return $this->modif_navigation;
74 74
 		}
75
-		public function getSupprimerPage(){
75
+		public function getSupprimerPage() {
76 76
 		    return $this->supprimer_page;
77 77
 		}
78 78
 
Please login to merge, or discard this patch.
core/RedirectError.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 			}
33 33
 
34 34
 
35
-			$find   = 'controller/';
35
+			$find = 'controller/';
36 36
 			$pos = strpos($url, $find);
37 37
 
38 38
 			if ($pos !== false) {
Please login to merge, or discard this patch.
core/functions/DateHeure.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 		 **/
25 25
 		public static function Heureenseconde($heure, $minute) {
26 26
 			if ((is_numeric($heure)) && (is_numeric($minute))) {
27
-				$heuresec = $heure*3600;
28
-				$minutesec = $minute*60;
29
-				$heureseconde = $heuresec+$minutesec;
27
+				$heuresec = $heure * 3600;
28
+				$minutesec = $minute * 60;
29
+				$heureseconde = $heuresec + $minutesec;
30 30
 				return $heureseconde;
31 31
 			}
32 32
 			else {
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
 		 * @param int $abreger si NOT NULL, on abrege la date, on enleve la semaine et on coupe le mois à 3 lettres
82 82
 		 * @return string
83 83
 		 */
84
-		public static function date_fr_texte($date=0, $abreger=null) {
85
-			$mois = array("Janvier", "Fevrier", "Mars", "Avril","Mai", "Juin", "Juillet", "Août","Septembre", "Octobre", "Novembre", "Decembre");
86
-			$jours= array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
84
+		public static function date_fr_texte($date = 0, $abreger = null) {
85
+			$mois = array("Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Decembre");
86
+			$jours = array("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");
87 87
 
88 88
 			if ($date == 0) {
89
-				return $jours[date("w")]." ".date("j").(date("j")==1 ? "er":" ").$mois[date("n")-1]." ".date("Y");
89
+				return $jours[date("w")]." ".date("j").(date("j") == 1 ? "er" : " ").$mois[date("n") - 1]." ".date("Y");
90 90
 			}
91 91
 			else if ((strpos($date, "-") > 0) || (strpos($date, "/") > 0)) {
92 92
 				$pos = strpos($date, "-");
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 					return $jour_d." ".mb_substr($explode[2], 0, 3, "UTF-8")." ".$annee_d;
112 112
 				}
113 113
 				else {
114
-					return $jour_semaine." ".$jour_d." ".$mois[$mois_d-1]." ".$annee_d;
114
+					return $jour_semaine." ".$jour_d." ".$mois[$mois_d - 1]." ".$annee_d;
115 115
 				}
116 116
 			}
117 117
 			else {
Please login to merge, or discard this patch.
core/modules/ImportModule.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,15 +51,15 @@
 block discarded – undo
51 51
 		 * @param $url_module
52 52
 		 * fonction qui permets d'importer un module dans notre site internet
53 53
 		 */
54
-		public function setImportModule($url_module, $update=null) {
55
-			$dbc= App::getDb();
54
+		public function setImportModule($url_module, $update = null) {
55
+			$dbc = App::getDb();
56 56
 
57 57
 			//avant tout on récupère le nom du fichier pour le mettre dans le dossier temporaire
58 58
 			$explode = explode("/", $url_module);
59 59
 			$this->nom_fichier = end($explode);
60 60
 
61 61
 			//on recupere le nom du dossier + extention
62
-			$explode  = explode(".", $this->nom_fichier);
62
+			$explode = explode(".", $this->nom_fichier);
63 63
 			$this->nom_dossier = $explode[0];
64 64
 			$this->extension = $explode[1];
65 65
 
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,6 +2,6 @@
 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
 ?>
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
admin/views/configuration/module.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,11 +7,11 @@  discard block
 block discarded – undo
7 7
 <script src="<?=LIBSWEBROOT?>checkbox/js/anim.js"></script>
8 8
 <link rel="stylesheet" type="text/css" href="<?=LIBSWEBROOT?>popup/css/style.css">
9 9
 <script src="<?=LIBSWEBROOT?>popup/js/popup.js"></script>
10
-<?php require_once(ROOT."admin/views/configuration/js/configuration.php");?>
11
-<?php require_once('header.php');?>
10
+<?php require_once(ROOT."admin/views/configuration/js/configuration.php"); ?>
11
+<?php require_once('header.php'); ?>
12 12
 
13 13
 <div class="inner">
14
-	<?php require_once(LIBSROOT."barre_chargement/index.php");?>
14
+	<?php require_once(LIBSROOT."barre_chargement/index.php"); ?>
15 15
 	<div class="contenu modifier-contenu">
16 16
 		<h2>Ajouter un module</h2>
17 17
 		<form action="<?=ADMWEBROOT?>controller/core/modules/installation/installer" method="get" id="form-install">
@@ -36,23 +36,23 @@  discard block
 block discarded – undo
36 36
 				</tr>
37 37
 			</thead>
38 38
 			<tbody>
39
-				<?php for ($i=0 ; $i<count($gestion_module_page_syst->getIdModule()) ; $i++):?>
39
+				<?php for ($i = 0; $i < count($gestion_module_page_syst->getIdModule()); $i++):?>
40 40
 					<tr>
41 41
 						<td><?=$gestion_module_page_syst->getNom()[$i]?></td>
42 42
 						<td>
43 43
 							<label for="<?=$gestion_module_page_syst->getUrl()[$i]?>" class="checkbox-perso switched">
44
-								<input type="checkbox" class="test-check" id="<?=$gestion_module_page_syst->getUrl()[$i]?>" <?php if (\core\modules\GestionModule::getModuleActiver($gestion_module_page_syst->getNom()[$i]) === true): ?>checked<?php endif;?> <?php if (\core\modules\GestionModule::getModuleInstaller($gestion_module_page_syst->getNom()[$i]) === false):?>disabled<?php endif;?>>
44
+								<input type="checkbox" class="test-check" id="<?=$gestion_module_page_syst->getUrl()[$i]?>" <?php if (\core\modules\GestionModule::getModuleActiver($gestion_module_page_syst->getNom()[$i]) === true): ?>checked<?php endif; ?> <?php if (\core\modules\GestionModule::getModuleInstaller($gestion_module_page_syst->getNom()[$i]) === false):?>disabled<?php endif; ?>>
45 45
 							</label>
46 46
 						</td>
47 47
 						<td>
48 48
 							<?php if (\core\modules\GestionModule::getModuleInstaller($gestion_module_page_syst->getNom()[$i]) === true) { ?>
49 49
 								<a class="open-popup" popup="popup-delete-module" href="<?=ADMWEBROOT?>controller/core/modules/installation/supprimer?id_module=<?=$gestion_module_page_syst->getIdModule()[$i]?>">Supprimer</a>
50
-							<?php }else{ ?>
50
+							<?php } else { ?>
51 51
 								<a class="installer-module" href="<?=ADMWEBROOT?>controller/core/modules/installation/installer?url=<?=$gestion_module_page_syst->getUrlTelechargement()[$i]?>">Installer</a>
52 52
 							<?php }?>
53 53
 						</td>
54 54
 						<td>
55
-							<?php if ((\core\modules\GestionModule::getModuleInstaller($gestion_module_page_syst->getNom()[$i]) === true) && (\core\modules\GestionModule::getModuleActiver($gestion_module_page_syst->getNom()[$i]) === true)){ ?>
55
+							<?php if ((\core\modules\GestionModule::getModuleInstaller($gestion_module_page_syst->getNom()[$i]) === true) && (\core\modules\GestionModule::getModuleActiver($gestion_module_page_syst->getNom()[$i]) === true)) { ?>
56 56
 								<?php if (\core\modules\GestionModule::getModuleAJour($gestion_module_page_syst->getNom()[$i]) != 1) { ?>
57 57
 									<a href="<?=ADMWEBROOT?>controller/core/modules/installation/update?id_module=<?=$gestion_module_page_syst->getIdModule()[$i]?>" class="open-popup" popup="popup-update-module">Mettre à jour</a>
58 58
 								<?php } else {?>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 							<?php }?>
64 64
 						</td>
65 65
 					</tr>
66
-				<?php endfor;?>
66
+				<?php endfor; ?>
67 67
 			</tbody>
68 68
 		</table>
69 69
 	</div>
@@ -79,23 +79,23 @@  discard block
 block discarded – undo
79 79
 				</tr>
80 80
 			</thead>
81 81
 			<tbody>
82
-				<?php for ($i=0 ; $i<count($gestion_module_page->getIdModule()) ; $i++):?>
82
+				<?php for ($i = 0; $i < count($gestion_module_page->getIdModule()); $i++):?>
83 83
 					<tr>
84 84
 						<td><?=$gestion_module_page->getNom()[$i]?></td>
85 85
 						<td>
86 86
 							<label for="<?=$gestion_module_page->getUrl()[$i]?>" class="checkbox-perso switched">
87
-								<input type="checkbox" class="test-check" id="<?=$gestion_module_page->getUrl()[$i]?>" <?php if (\core\modules\GestionModule::getModuleActiver($gestion_module_page->getNom()[$i]) === true): ?>checked<?php endif;?>>
87
+								<input type="checkbox" class="test-check" id="<?=$gestion_module_page->getUrl()[$i]?>" <?php if (\core\modules\GestionModule::getModuleActiver($gestion_module_page->getNom()[$i]) === true): ?>checked<?php endif; ?>>
88 88
 							</label>
89 89
 						</td>
90 90
 						<td>
91 91
 							<?php if (\core\modules\GestionModule::getModuleInstaller($gestion_module_page->getNom()[$i]) === true) { ?>
92 92
 								<a class="supprimer open-popup" popup="popup-delete-module" href="<?=ADMWEBROOT?>controller/core/modules/installation/supprimer?id_module=<?=$gestion_module_page->getIdModule()[$i]?>">Supprimer</a>
93
-							<?php }else{ ?>
93
+							<?php } else { ?>
94 94
 								<a href="<?=ADMWEBROOT?>controller/core/modules/installation/installer?url=<?=$gestion_module_page->getUrlTelechargement()[$i]?>">Installer</a>
95 95
 							<?php }?>
96 96
 						</td>
97 97
 					</tr>
98
-				<?php endfor;?>
98
+				<?php endfor; ?>
99 99
 			</tbody>
100 100
 		</table>
101 101
 	</div>
Please login to merge, or discard this patch.
core/modules/GestionModule.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,12 +198,12 @@
 block discarded – undo
198 198
 						}
199 199
 
200 200
 						//on recupere le nom du dossier + extention
201
-						$explode  = explode(".", $obj->url_telechargement);
201
+						$explode = explode(".", $obj->url_telechargement);
202 202
 						array_pop($explode);
203 203
 
204 204
 						$version_txt = implode(".", $explode)."_version.txt";
205 205
 
206
-						if(file_get_contents($version_txt) !== "") {
206
+						if (file_get_contents($version_txt) !== "") {
207 207
 
208 208
 							//online pour bdd
209 209
 							$version_online_txt = file_get_contents($version_txt);
Please login to merge, or discard this patch.
core/images/Resize.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
 			private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight)
196 196
 			{
197 197
 				// *** Find center - this will be used for the crop
198
-				$cropStartX = ( $optimalWidth / 2) - ( $newWidth /2 );
199
-				$cropStartY = ( $optimalHeight/ 2) - ( $newHeight/2 );
198
+				$cropStartX = ($optimalWidth / 2) - ($newWidth / 2);
199
+				$cropStartY = ($optimalHeight / 2) - ($newHeight / 2);
200 200
 
201 201
 				$crop = $this->imageResized;
202 202
 
203 203
 				// *** Now crop from center to exact requested size
204
-				$this->imageResized = imagecreatetruecolor($newWidth , $newHeight);
205
-				imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight);
204
+				$this->imageResized = imagecreatetruecolor($newWidth, $newHeight);
205
+				imagecopyresampled($this->imageResized, $crop, 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight, $newWidth, $newHeight);
206 206
 			}
207 207
 
208 208
 			## --------------------------------------------------------
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 			 * @param string $savePath
211 211
 			 * @param string $imageQuality
212 212
 			 */
213
-			public function saveImage($savePath, $imageQuality="100")
213
+			public function saveImage($savePath, $imageQuality = "100")
214 214
 			{
215 215
 				// *** Get extension
216 216
         		$extension = strrchr($savePath, '.');
217 217
        			$extension = strtolower($extension);
218 218
 
219
-				switch($extension)
219
+				switch ($extension)
220 220
 				{
221 221
 					case '.jpg':
222 222
 					case '.jpeg':
Please login to merge, or discard this patch.