Completed
Push — master ( 09b169...f4bae9 )
by cam
01:17
created
ecrire/inc/editer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -329,8 +329,7 @@
 block discarded – undo
329 329
 		if (!autoriser('modifier', $type, intval($id))){
330 330
 			$valeurs['editable'] = '';
331 331
 		}
332
-	}
333
-	else {
332
+	} else {
334 333
 		if (!autoriser('creer', $type, 0, null, ['id_parent' => $id_parent])) {
335 334
 			$valeurs['editable'] = '';
336 335
 		}
Please login to merge, or discard this patch.
ecrire/inc/autoriser.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -237,8 +237,7 @@  discard block
 block discarded – undo
237 237
 		if ($id === '*') {
238 238
 			unset($GLOBALS['autoriser_exception'][$faire][$type]);
239 239
 			unset($autorisation[$faire][$type]);
240
-		}
241
-		else {
240
+		} else {
242 241
 			unset($GLOBALS['autoriser_exception'][$faire][$type][$id]);
243 242
 			unset($autorisation[$faire][$type][$id]);
244 243
 		}
@@ -592,8 +591,7 @@  discard block
 block discarded – undo
592 591
 function autoriser_rubrique_creer_dist($faire, $type, $id, $qui, $opt) {
593 592
 	if (!empty($opt['id_parent'])) {
594 593
 		return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui);
595
-	}
596
-	else {
594
+	} else {
597 595
 		return autoriser('defaut', null, null, $qui, $opt);
598 596
 	}
599 597
 }
@@ -739,8 +737,7 @@  discard block
 block discarded – undo
739 737
 	if (!empty($opt['id_parent'])) {
740 738
 		// creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi
741 739
 		return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui);
742
-	}
743
-	else {
740
+	} else {
744 741
 		return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], array('0minirezo', '1comite')));
745 742
 	}
746 743
 }
Please login to merge, or discard this patch.
ecrire/inc/minipres.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -192,11 +192,9 @@
 block discarded – undo
192 192
 
193 193
 		if ($statut AND test_espace_prive()) {
194 194
 			$corps = bouton_action(_T('public:accueil_site'),generer_url_ecrire('accueil'));
195
-		}
196
-		elseif (!empty($_COOKIE['spip_admin'])) {
195
+		} elseif (!empty($_COOKIE['spip_admin'])) {
197 196
 			$corps = bouton_action(_T('public:lien_connecter'),generer_url_public('login'));
198
-		}
199
-		else {
197
+		} else {
200 198
 			$corps = bouton_action(_T('public:accueil_site'),$GLOBALS['meta']['adresse_site']);
201 199
 		}
202 200
 		$corps = "<div class='boutons'>$corps</div>";
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/inc/envoyer_mail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -205,8 +205,7 @@
 block discarded – undo
205 205
 	// Marie Toto <[email protected]> => @toto.com
206 206
 	if (preg_match('/@[^\s>]+/', $from, $domain)) {
207 207
 		$domain = $domain[0];
208
-	}
209
-	else {
208
+	} else {
210 209
 		$domain = "@unknown-".md5($from).'.org';
211 210
 	}
212 211
 	$uniq = rand() . '_' . md5($to . $texte) . $domain;
Please login to merge, or discard this patch.
ecrire/inc/acces.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -359,8 +359,7 @@
 block discarded – undo
359 359
 function generer_htpass($pass) {
360 360
 	if ($generer_htpass = charger_fonction('generer_htpass', 'inc', true)) {
361 361
 		return $generer_htpass($pass);
362
-	}
363
-	elseif (function_exists('crypt')) {
362
+	} elseif (function_exists('crypt')) {
364 363
 		return crypt($pass, initialiser_sel());
365 364
 	}
366 365
 	return '';
Please login to merge, or discard this patch.
ecrire/inc/rubriques.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@  discard block
 block discarded – undo
77 77
 				break; // stop on a trouvé le bon champ
78 78
 			}
79 79
 		}
80
-	}
81
-	else {
80
+	} else {
82 81
 		$statuts_publies = array('publie');
83 82
 	}
84 83
 	
@@ -105,10 +104,12 @@  discard block
 block discarded – undo
105 104
 		}
106 105
 	}
107 106
 
108
-	if ($neuf) // Sauver la date de la derniere mise a jour (pour menu_rubriques)
107
+	if ($neuf) {
108
+	    // Sauver la date de la derniere mise a jour (pour menu_rubriques)
109 109
 	{
110 110
 		ecrire_meta("date_calcul_rubriques", date("U"));
111 111
 	}
112
+	}
112 113
 
113 114
 	$langues = calculer_langues_utilisees();
114 115
 	ecrire_meta('langues_utilisees', $langues);
Please login to merge, or discard this patch.
ecrire/public/fonctions.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,10 +115,12 @@  discard block
 block discarded – undo
115 115
 
116 116
 	// et reparagrapher si necessaire (coherence avec le cas descriptif)
117 117
 	// une introduction a tojours un <p>
118
-	if ($GLOBALS['toujours_paragrapher']) // Fermer les paragraphes
118
+	if ($GLOBALS['toujours_paragrapher']) {
119
+	    // Fermer les paragraphes
119 120
 	{
120 121
 		$texte = paragrapher($texte, $GLOBALS['toujours_paragrapher']);
121 122
 	}
123
+	}
122 124
 
123 125
 	return $texte;
124 126
 }
@@ -207,8 +209,7 @@  discard block
 block discarded – undo
207 209
 		$pagination['type_pagination'] = $modele;
208 210
 		if (trouver_fond('pagination_'.$modele, 'modeles')) {
209 211
 			$modele = '_' . $modele;
210
-		}
211
-		else {
212
+		} else {
212 213
 			$modele = '';
213 214
 		}
214 215
 	}
@@ -295,8 +296,7 @@  discard block
 block discarded – undo
295 296
 	if ($ids) {
296 297
 		$ids = array_column($ids, 'id_objet');
297 298
 		return implode(',', $ids);
298
-	}
299
-	else {
299
+	} else {
300 300
 		return "0";
301 301
 	}
302 302
 }
Please login to merge, or discard this patch.
ecrire/base/objets.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -981,8 +981,9 @@  discard block
 block discarded – undo
981 981
 	static $tables = array();
982 982
 	if (!isset($tables[$serveur])){
983 983
 		$tables[$serveur] = array();
984
-		if (!function_exists("sql_alltable"))
985
-			include_spip("base/abstract_sql");
984
+		if (!function_exists("sql_alltable")) {
985
+					include_spip("base/abstract_sql");
986
+		}
986 987
 		$ts = sql_alltable('%',$serveur); // toutes les tables
987 988
 		foreach ($ts as $t){
988 989
 			$tables[$serveur][$t] = $t;
@@ -1384,8 +1385,7 @@  discard block
 block discarded – undo
1384 1385
 							'champ' 	=> $parent_methode['champ'],
1385 1386
 							'table'    => $table,
1386 1387
 						);
1387
-					}
1388
-					elseif (isset($parent_methode['champ_type'])) {
1388
+					} elseif (isset($parent_methode['champ_type'])) {
1389 1389
 						$parent = array(
1390 1390
 							'objet' 	 => $ligne[$parent_methode['champ_type']],
1391 1391
 							'id_objet' 	 => intval($ligne[$parent_methode['champ']]),
Please login to merge, or discard this patch.