Completed
Push — master ( f50317...15d2e0 )
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/public/fonctions.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,8 +207,7 @@  discard block
 block discarded – undo
207 207
 		$pagination['type_pagination'] = $modele;
208 208
 		if (trouver_fond('pagination_' . $modele, 'modeles')) {
209 209
 			$modele = '_' . $modele;
210
-		}
211
-		else {
210
+		} else {
212 211
 			$modele = '';
213 212
 		}
214 213
 	}
@@ -295,8 +294,7 @@  discard block
 block discarded – undo
295 294
 	if ($ids) {
296 295
 		$ids = array_column($ids, 'id_objet');
297 296
 		return implode(',', $ids);
298
-	}
299
-	else {
297
+	} else {
300 298
 		return '0';
301 299
 	}
302 300
 }
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/filtres_images_lib_mini.php 1 patch
Braces   +4 added lines, -9 removed lines patch added patch discarded remove patch
@@ -524,8 +524,7 @@  discard block
 block discarded – undo
524 524
 			process_image_svg_identite($ret);
525 525
 			$ret['creer'] = false;
526 526
 		}
527
-	}
528
-	else {
527
+	} else {
529 528
 		if (!function_exists($ret['fonction_imagecreatefrom'])) {
530 529
 			return false;
531 530
 		}
@@ -628,8 +627,7 @@  discard block
 block discarded – undo
628 627
 
629 628
 	if (isset($info['mime'])) {
630 629
 		$mime = $info['mime'];
631
-	}
632
-	else {
630
+	} else {
633 631
 		$mime = image_type_to_mime_type($info[2]);
634 632
 	}
635 633
 
@@ -1408,9 +1406,7 @@  discard block
 block discarded – undo
1408 1406
 	if ($srcWidth and $srcWidth <= $maxWidth and $srcHeight <= $maxHeight) {
1409 1407
 		$vignette = $destination . '.' . $format;
1410 1408
 		@copy($image, $vignette);
1411
-	}
1412
-
1413
-	elseif ($valeurs['format_source'] === 'svg') {
1409
+	} elseif ($valeurs['format_source'] === 'svg') {
1414 1410
 		if ($svg = svg_redimensionner($valeurs['fichier'], $destWidth, $destHeight)) {
1415 1411
 			$format_sortie = 'svg';
1416 1412
 			$vignette = $destination . '.' . $format_sortie;
@@ -1846,8 +1842,7 @@  discard block
 block discarded – undo
1846 1842
 		$date = test_espace_prive() ? ('?' . $date) : '';
1847 1843
 
1848 1844
 		return _image_ecrire_tag($image, ['src' => "$logo$date", 'width' => $destWidth, 'height' => $destHeight]);
1849
-	}
1850
-	else {
1845
+	} else {
1851 1846
 		# BMP, tiff ... les redacteurs osent tout!
1852 1847
 		return $img;
1853 1848
 	}
Please login to merge, or discard this patch.