Completed
Push — master ( e997e0...cc9c6b )
by cam
01:07
created
ecrire/inc/precharger_objet.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,7 @@
 block discarded – undo
157 157
 			if (count($autre_langue) == 1) {
158 158
 				$row['lang'] = reset($autre_langue);
159 159
 			}
160
-		}
161
-		else {
160
+		} else {
162 161
 			$row['lang'] = 'en';
163 162
 		}
164 163
 
Please login to merge, or discard this patch.
ecrire/inc/securiser_action.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
 		$url_action = self();
86 86
 		$action = _request('action');
87 87
 		$url_action = parametre_url($url_action, 'action', $action, '&');
88
-	}
89
-	else {
88
+	} else {
90 89
 		$action = parametre_url($url_action, 'action');
91 90
 	}
92 91
 
Please login to merge, or discard this patch.
ecrire/public/tracer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,15 +20,13 @@  discard block
 block discarded – undo
20 20
 	if ($trace === '?' or defined('_DEBUG_TRACE_QUERIES')) {
21 21
 		if (defined('_DEBUG_TRACE_QUERIES') and _DEBUG_TRACE_QUERIES) {
22 22
 			$trace = true;
23
-		}
24
-		else {
23
+		} else {
25 24
 			if (empty($GLOBALS['visiteur_session'])) {
26 25
 				// si un anonyme fait un var_profile on est oblige de remplir le tableau des temps en attendant de savoir
27 26
 				// car ici on ne sait pas si c'est un hit anonyme
28 27
 				// ou une requete SQL faite avant chargement de la session
29 28
 				$trace = (!empty($_GET['var_profile']) ? '?' : false);
30
-			}
31
-			else {
29
+			} else {
32 30
 				include_spip('inc/autoriser');
33 31
 				// gare au bouclage sur calcul de droits au premier appel
34 32
 				// A fortiori quand on demande une trace
@@ -50,8 +48,7 @@  discard block
 block discarded – undo
50 48
 			// car ici on ne sait pas si c'est un hit anonyme
51 49
 			// ou une requete SQL faite avant chargement de la session
52 50
 			$trace = (!empty($_GET['var_profile']) ? '?' : false);
53
-		}
54
-		else {
51
+		} else {
55 52
 			include_spip('inc/autoriser');
56 53
 			// gare au bouclage sur calcul de droits au premier appel
57 54
 			// A fortiori quand on demande une trace
Please login to merge, or discard this patch.
ecrire/public/compiler.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -920,8 +920,7 @@
 block discarded – undo
920 920
 			if (isset($boucles[$idb]->descr['sourcefile'])) {
921 921
 				$descr['sourcefile'] = $boucles[$idb]->descr['sourcefile'];
922 922
 			}
923
-		}
924
-		else {
923
+		} else {
925 924
 			$descr = [];
926 925
 		}
927 926
 	}
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -802,8 +802,7 @@  discard block
 block discarded – undo
802 802
 function public_compte_ligne($texte, $debut = 0, $fin = null) {
803 803
 	if (is_null($fin)) {
804 804
 		return substr_count($texte, "\n", $debut);
805
-	}
806
-	else {
805
+	} else {
807 806
 		return substr_count($texte, "\n", $debut, $fin - $debut);
808 807
 	}
809 808
 }
@@ -850,8 +849,7 @@  discard block
 block discarded – undo
850 849
 			erreur_squelette($err_b, $result);
851 850
 
852 851
 			continue;
853
-		}
854
-		else {
852
+		} else {
855 853
 			$boucle = [
856 854
 				'id_boucle' => $id_boucle,
857 855
 				'id_boucle_err' => $id_boucle,
@@ -991,8 +989,7 @@  discard block
 block discarded – undo
991 989
 	// si c'est un appel pour memoriser une boucle, memorisons la
992 990
 	if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) {
993 991
 		$boucles_connues[$boucle_placeholder][$champ] = &$boucle;
994
-	}
995
-	else {
992
+	} else {
996 993
 		if (!empty($champ->nom_champ) and !empty($boucles_connues[$champ->nom_champ])) {
997 994
 			$placeholder = $champ->nom_champ;
998 995
 			$id = reset($champ->param[0][1]);
@@ -1135,8 +1132,7 @@  discard block
 block discarded – undo
1135 1132
 				];
1136 1133
 				erreur_squelette($err_b, $result);
1137 1134
 				$pos_courante += strlen($fin_boucle);
1138
-			}
1139
-			else {
1135
+			} else {
1140 1136
 				// verifier une eventuelle imbrication d'une boucle homonyme
1141 1137
 				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1142 1138
 				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
Please login to merge, or discard this patch.
ecrire/base/objets.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1395,8 +1395,7 @@
 block discarded – undo
1395 1395
 							'champ' 	=> $parent_methode['champ'],
1396 1396
 							'table'    => $table,
1397 1397
 						];
1398
-					}
1399
-					elseif (isset($parent_methode['champ_type'])) {
1398
+					} elseif (isset($parent_methode['champ_type'])) {
1400 1399
 						$parent = [
1401 1400
 							'objet' 	 => $ligne[$parent_methode['champ_type']],
1402 1401
 							'id_objet' 	 => intval($ligne[$parent_methode['champ']]),
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -561,11 +561,9 @@  discard block
 block discarded – undo
561 561
 		if (!isset($msg[$p])) {
562 562
 			if (isset($resume['erreur']) and $resume['erreur']) {
563 563
 				$msg[$p] = [$resume['erreur']];
564
-			}
565
-			elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
564
+			} elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) {
566 565
 				$msg[$p] = [plugin_message_incompatibilite($k['compatibilite'], $GLOBALS['spip_version_branche'], 'SPIP', 'necessite')];
567
-			}
568
-			elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
566
+			} elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) {
569 567
 				$msg[$p] = plugin_necessite($k['utilise'], $liste, 'utilise');
570 568
 			}
571 569
 		} else {
@@ -954,8 +952,7 @@  discard block
 block discarded – undo
954 952
 					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
955 953
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
956 954
 					}
957
-				}
958
-				else {
955
+				} else {
959 956
 					foreach ($info['chemin'] as $chemin) {
960 957
 						if (
961 958
 							!isset($chemin['version']) or plugin_version_compatible(
@@ -1425,8 +1422,7 @@  discard block
 block discarded – undo
1425 1422
 						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1426 1423
 						  $trace,
1427 1424
 						  "\n";
1428
-					}
1429
-					else {
1425
+					} else {
1430 1426
 						include_spip('inc/filtres_boites');
1431 1427
 						echo "<div class='install-plugins svp_retour'>"
1432 1428
 							. boite_ouvrir($titre, ($ok ? 'success' : 'error'))
@@ -1463,8 +1459,7 @@  discard block
 block discarded – undo
1463 1459
 	if (file_exists($nom)) {
1464 1460
 		if (substr($nom, -4) == '.php') {
1465 1461
 			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1466
-		}
1467
-		else {
1462
+		} else {
1468 1463
 			$fichier_tmp = $nom . '.tmp';
1469 1464
 		}
1470 1465
 		file_put_contents($fichier_tmp, $contenu);
Please login to merge, or discard this patch.
ecrire/inc/flock.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -341,8 +341,7 @@
 block discarded – undo
341 341
 	) {
342 342
 		if ($use_copy) {
343 343
 			@copy($fichier_tmp, $fichier);
344
-		}
345
-		else {
344
+		} else {
346 345
 			@rename($fichier_tmp, $fichier);
347 346
 		}
348 347
 		// eviter que PHP ne reserve le vieux timestamp
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -364,8 +364,7 @@  discard block
 block discarded – undo
364 364
 	}
365 365
 	if (!isset($regs[2])) {
366 366
 		$niveau = _LOG_INFO;
367
-	}
368
-	else {
367
+	} else {
369 368
 		$niveau = intval($regs[2]);
370 369
 	}
371 370
 
@@ -1475,8 +1474,7 @@  discard block
 block discarded – undo
1475 1474
 	) {
1476 1475
 		if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1477 1476
 			return $themefiles["$subdir$file"] = $fsize;
1478
-		}
1479
-		else {
1477
+		} else {
1480 1478
 			return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1481 1479
 		}
1482 1480
 	}
@@ -3496,8 +3494,7 @@  discard block
 block discarded – undo
3496 3494
 		if (!in_array('svg', $formats)) {
3497 3495
 			$formats[] = 'svg';
3498 3496
 		}
3499
-	}
3500
-	else {
3497
+	} else {
3501 3498
 		$formats = array_diff($formats, ['svg']);
3502 3499
 	}
3503 3500
 	return $formats;
Please login to merge, or discard this patch.