Completed
Push — master ( b872a5...71c68d )
by cam
01:07
created
ecrire/inc/lang.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 
42 42
 	if (is_null($liste_langues)) {
43 43
 		$liste_langues = @$GLOBALS['meta']['langues_proposees'] . ',' . @$GLOBALS['meta']['langues_multilingue'];
44
-	}
45
-	else {
44
+	} else {
46 45
 		if (is_array($liste_langues)) {
47 46
 			$liste_langues = implode(',', $liste_langues);
48 47
 		}
Please login to merge, or discard this patch.
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/req/sqlite_generique.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2006,8 +2006,7 @@  discard block
 block discarded – undo
2006 2006
 		// si on ne connait pas le type on le deduit de $v autant que possible
2007 2007
 		if (is_bool($v)) {
2008 2008
 			return strval(intval($v));
2009
-		}
2010
-		elseif (is_numeric($v)) {
2009
+		} elseif (is_numeric($v)) {
2011 2010
 			return strval($v);
2012 2011
 		}
2013 2012
 	}
@@ -2633,8 +2632,7 @@  discard block
 block discarded – undo
2633 2632
 				$tables[$table]['valeur'][$k] = _sqlite_calculer_cite($now, $tables[$table]['desc'][$k]);
2634 2633
 			}
2635 2634
 		}
2636
-	}
2637
-	else {
2635
+	} else {
2638 2636
 		$now = _sqlite_func_now(true);
2639 2637
 		foreach (array_keys($tables[$table]['desc']) as $k) {
2640 2638
 			$tables[$table]['valeur'][$k] = _sqlite_calculer_cite($now, $tables[$table]['desc'][$k]);
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.