Completed
Push — master ( fb0017...92433c )
by cam
01:14
created
prive/formulaires/editer_liens.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -549,15 +549,13 @@
 block discarded – undo
549 549
 						or $oups['args'] !== lien_gerer__oups_collecter_args($form, debug_backtrace(null, 5))
550 550
 						or empty($oups['oups_value'])) {
551 551
 						$oups = null;
552
-					}
553
-					else {
552
+					} else {
554 553
 						$oups = $oups['oups_value'];
555 554
 						// controler le contenu
556 555
 						foreach ($oups as $k => $oup) {
557 556
 							if (!is_array($oup)) {
558 557
 								unset($oups[$k]);
559
-							}
560
-							else {
558
+							} else {
561 559
 								foreach ($oup as $champ => $valeur) {
562 560
 									if (!is_scalar($champ)
563 561
 										or !is_scalar($valeur)
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/AbstractCollecteur.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,8 +154,7 @@
 block discarded – undo
154 154
 				if ($c = base64_decode($base64, true)) {
155 155
 					$texte = substr_replace($texte, $c, $p, $end + 2 - $p);
156 156
 					$pos = $p + strlen($c);
157
-				}
158
-				else {
157
+				} else {
159 158
 					$pos = $end;
160 159
 				}
161 160
 			}
Please login to merge, or discard this patch.
ecrire/inc/texte_mini.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@  discard block
 block discarded – undo
83 83
 		  . '</code>'
84 84
 		  . '</pre>'
85 85
 		  . '</div>';
86
-	}
87
-	else {
86
+	} else {
88 87
 		$echap = str_replace("\t", "&nbsp; &nbsp; &nbsp; &nbsp; ", $echap);
89 88
 		$echap = str_replace("  ", " &nbsp;", $echap);
90 89
 		$html = "<code class=\"$class\" dir=\"ltr\"$attributs>" . $echap . '</code>';
@@ -611,8 +610,7 @@  discard block
 block discarded – undo
611 610
 		$collecteurLiens = $collecteurModeles = null;
612 611
 		if (!empty($options['expanser_liens'])) {
613 612
 			$texte = expanser_liens($texte, $env['connect'] ?? '', $env['env'] ?? []);
614
-		}
615
-		else {
613
+		} else {
616 614
 			include_spip("src/Texte/Collecteur/AbstractCollecteur");
617 615
 			include_spip("src/Texte/Collecteur/Liens");
618 616
 			include_spip("src/Texte/Collecteur/Modeles");
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/Multis.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,8 +185,7 @@
 block discarded – undo
185 185
 					$trads = $m['trads'];
186 186
 					if (empty($trads)) {
187 187
 						$trad = '';
188
-					}
189
-					elseif ($l = approcher_langue($trads, $lang)) {
188
+					} elseif ($l = approcher_langue($trads, $lang)) {
190 189
 						$trad = $trads[$l];
191 190
 					} else {
192 191
 						if ($lang_defaut == 'aucune') {
Please login to merge, or discard this patch.
ecrire/balise/formulaire_inscription.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 	if (!is_array($id_ou_options)) {
81 81
 		$options = ['id' => intval($id_ou_options)];
82 82
 		$id = $options['id'];
83
-	}else {
83
+	} else {
84 84
 		$options = $id_ou_options;
85 85
 		$id = (int) ($id_ou_options['id'] ?? 0);
86 86
 	}
Please login to merge, or discard this patch.
prive/formulaires/mot_de_passe.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,8 +169,7 @@
 block discarded – undo
169 169
 			$auth = auth_identifier_login($row['login'], $oubli);
170 170
 			if (!is_array($auth)) {
171 171
 				spip_log("Erreur identification ".$row['login']." après changement de mot de passe: $auth", _LOG_ERREUR);
172
-			}
173
-			elseif ($auth['id_auteur'] == $id_auteur) {
172
+			} elseif ($auth['id_auteur'] == $id_auteur) {
174 173
 				auth_loger($auth);
175 174
 			}
176 175
 		}
Please login to merge, or discard this patch.
ecrire/base/connect_sql.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,13 +68,11 @@  discard block
 block discarded – undo
68 68
 					$f = find_in_path("$serveur.php", 'connect/');
69 69
 				}
70 70
 			}
71
-		}
72
-		else {
71
+		} else {
73 72
 			if (defined('_FILE_CONNECT') and _FILE_CONNECT) {
74 73
 				// init du serveur principal
75 74
 				$f = _FILE_CONNECT;
76
-			}
77
-			elseif ($install and defined('_FILE_CONNECT_TMP')) {
75
+			} elseif ($install and defined('_FILE_CONNECT_TMP')) {
78 76
 				// installation en cours
79 77
 				$f = _FILE_CONNECT_TMP;
80 78
 			}
@@ -87,8 +85,7 @@  discard block
 block discarded – undo
87 85
 			if (!isset($GLOBALS['db_ok'])) {
88 86
 				spip_log("spip_connect: fichier de connexion '$f' OK mais echec connexion au serveur", _LOG_HS);
89 87
 			}
90
-		}
91
-		else {
88
+		} else {
92 89
 			spip_log("spip_connect: fichier de connexion '$f' non trouve, pas de connexion serveur", _LOG_HS);
93 90
 		}
94 91
 		if (!isset($GLOBALS['db_ok'])) {
@@ -456,8 +453,7 @@  discard block
 block discarded – undo
456 453
 					and strpos($query_echappees, $part . $next, $currentpos) === $nextpos
457 454
 				) {
458 455
 					$part .= array_shift($textes);
459
-				}
460
-				else {
456
+				} else {
461 457
 					break;
462 458
 				}
463 459
 			}
Please login to merge, or discard this patch.
ecrire/public/fonctions.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -209,8 +209,7 @@  discard block
 block discarded – undo
209 209
 		$pagination['type_pagination'] = $modele;
210 210
 		if (trouver_fond('pagination_' . $modele, 'modeles')) {
211 211
 			$modele = '_' . $modele;
212
-		}
213
-		else {
212
+		} else {
214 213
 			$modele = '';
215 214
 		}
216 215
 	}
@@ -297,8 +296,7 @@  discard block
 block discarded – undo
297 296
 	if ($ids) {
298 297
 		$ids = array_column($ids, 'id_objet');
299 298
 		return implode(',', $ids);
300
-	}
301
-	else {
299
+	} else {
302 300
 		return '0';
303 301
 	}
304 302
 }
@@ -672,8 +670,7 @@  discard block
 block discarded – undo
672 670
 		$logo_bg = timestamp($logo_bg);
673 671
 		$styles .= ".page_login, .page_spip_pass {background-image:url($logo_bg), url($logo_mini);}\n";
674 672
 		$Pile[0]['body_class'] = 'fond_image';
675
-	}
676
-	else {
673
+	} else {
677 674
 		$Pile[0]['body_class'] = 'sans_fond';
678 675
 	}
679 676
 	if ($styles) {
Please login to merge, or discard this patch.
ecrire/src/Afficher/Minipage/Admin.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -115,11 +115,9 @@  discard block
 block discarded – undo
115 115
 
116 116
 			if ($statut and test_espace_prive()) {
117 117
 				$footer = bouton_action(_T('public:accueil_site'), generer_url_ecrire('accueil'));
118
-			}
119
-			elseif (!empty($_COOKIE['spip_admin'])) {
118
+			} elseif (!empty($_COOKIE['spip_admin'])) {
120 119
 				$footer = bouton_action(_T('public:lien_connecter'), generer_url_public('login'));
121
-			}
122
-			else {
120
+			} else {
123 121
 				$footer = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site'] ?? '');
124 122
 			}
125 123
 
@@ -131,12 +129,10 @@  discard block
 block discarded – undo
131 129
 					. $titre
132 130
 					. "</div>";
133 131
 				$options['titre'] = '';
134
-			}
135
-			else {
132
+			} else {
136 133
 				$options['titre'] = $titre;
137 134
 			}
138
-		}
139
-		else {
135
+		} else {
140 136
 			$options['titre'] = $titre;
141 137
 		}
142 138
 		$options['page_title'] = $titre;
Please login to merge, or discard this patch.