Completed
Push — master ( 7f6c2c...996e17 )
by cam
01:04
created
ecrire/public/composer.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$GLOBALS['debug_objets']['courant'] = $nom;
56 56
 	}
57 57
 
58
-	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php';
58
+	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php';
59 59
 
60 60
 	// si squelette est deja compile et perenne, le charger
61 61
 	if (!squelette_obsolete($phpfile, $source)) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		#}
69 69
 	}
70 70
 
71
-	if (file_exists($lib = $squelette . '_fonctions' . '.php')) {
71
+	if (file_exists($lib = $squelette.'_fonctions'.'.php')) {
72 72
 		include_once $lib;
73 73
 	}
74 74
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 			eval("return true; $f ;");
97 97
 		} catch (\ParseError $e) {
98 98
 			// Code syntaxiquement faux (critere etc mal programme')
99
-			$msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage();
99
+			$msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage();
100 100
 			erreur_squelette($msg, $boucle);
101 101
 			// continuer pour trouver d'autres fautes eventuelles
102 102
 			// mais prevenir que c'est mort
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 	if (defined('_VAR_MODE') and _VAR_MODE == 'debug') {
126 126
 		// Tracer ce qui vient d'etre compile
127
-		$GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code;
127
+		$GLOBALS['debug_objets']['code'][$nom.'tout'] = $code;
128 128
 
129 129
 		// si c'est ce que demande le debusqueur, lui passer la main
130 130
 		if (
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
 		$code = "
149 149
 /*
150 150
  * Squelette : $sourcefile
151
- * Date :      " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT
152
- * Compile :   ' . gmdate('D, d M Y H:i:s', time()) . ' GMT
153
- * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   ' . $noms)) . '
151
+ * Date :      ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT
152
+ * Compile :   ' . gmdate('D, d M Y H:i:s', time()).' GMT
153
+ * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   '.$noms)).'
154 154
  */ ';
155 155
 	}
156 156
 
157
-	$code = '<' . "?php\n" . $code . join('', $boucles) . "\n";
157
+	$code = '<'."?php\n".$code.join('', $boucles)."\n";
158 158
 	if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) {
159 159
 		ecrire_fichier($phpfile, $code);
160 160
 	}
@@ -216,18 +216,18 @@  discard block
 block discarded – undo
216 216
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
217 217
 
218 218
 			if ($j == 'X-Spip-Filtre' and isset($headers[$j])) {
219
-				$headers[$j] .= '|' . $r[3];
219
+				$headers[$j] .= '|'.$r[3];
220 220
 			} else {
221
-				$headers[$j] = str_replace(['\\\\',"\\'",'\\"'], ['\\',"'",'"'], $r[3]);
221
+				$headers[$j] = str_replace(['\\\\', "\\'", '\\"'], ['\\', "'", '"'], $r[3]);
222 222
 			}
223 223
 		}
224 224
 	}
225 225
 	// S'agit-il d'un resultat constant ou contenant du code php
226 226
 	$process_ins = (
227
-		strpos($corps, '<' . '?') === false
227
+		strpos($corps, '<'.'?') === false
228 228
 		or
229
-		(strpos($corps, '<' . '?xml') !== false and
230
-			strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
229
+		(strpos($corps, '<'.'?xml') !== false and
230
+			strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
231 231
 	)
232 232
 		? 'html'
233 233
 		: 'php';
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 
257 257
 		if ($process_ins == 'html') {
258 258
 			$skel['process_ins'] = (
259
-				strpos($corps, '<' . '?') === false
259
+				strpos($corps, '<'.'?') === false
260 260
 				or
261
-				(strpos($corps, '<' . '?xml') !== false and
262
-					strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
261
+				(strpos($corps, '<'.'?xml') !== false and
262
+					strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
263 263
 			)
264 264
 				? 'html'
265 265
 				: 'php';
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 //
278 278
 
279 279
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
280
-define('CODE_INCLURE_BALISE', '<' . '?php
280
+define('CODE_INCLURE_BALISE', '<'.'?php
281 281
 include_once("%s");
282 282
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
283 283
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		// pas de lien symbolique sous Windows
309 309
 		and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false)
310 310
 	) {
311
-		$file = './" . _DIR_RACINE . "' . $file;
311
+		$file = './" . _DIR_RACINE . "'.$file;
312 312
 	}
313 313
 
314 314
 	$lang = $context_compil[4];
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 	$args = array_map('argumenter_squelette', $args);
320 320
 	if (!empty($context_compil['appel_php_depuis_modele'])) {
321
-		$args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')';
321
+		$args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')';
322 322
 	}
323 323
 	$args = join(', ', $args);
324 324
 
@@ -352,14 +352,14 @@  discard block
 block discarded – undo
352 352
 	if (is_object($v)) {
353 353
 		return var_export($v, true);
354 354
 	} elseif (!is_array($v)) {
355
-		return "'" . texte_script((string) $v) . "'";
355
+		return "'".texte_script((string) $v)."'";
356 356
 	} else {
357 357
 		$out = [];
358 358
 		foreach ($v as $k => $val) {
359
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
359
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
360 360
 		}
361 361
 
362
-		return 'array(' . join(', ', $out) . ')';
362
+		return 'array('.join(', ', $out).')';
363 363
 	}
364 364
 }
365 365
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 	}
438 438
 
439 439
 	// Y a-t-il une fonction de traitement des arguments ?
440
-	$f = 'balise_' . $nom_balise . '_stat';
440
+	$f = 'balise_'.$nom_balise.'_stat';
441 441
 
442 442
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
443 443
 
@@ -447,18 +447,18 @@  discard block
 block discarded – undo
447 447
 
448 448
 	// verifier que la fonction dyn est la,
449 449
 	// sinon se replier sur la generique si elle existe
450
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
450
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
451 451
 		if (
452 452
 			$balise_generique = chercher_balise_generique($nom)
453 453
 			and $nom_balise_generique = $balise_generique['nom_generique']
454
-			and $file = include_spip('balise/' . strtolower($nom_balise_generique))
455
-			and function_exists('balise_' . $nom_balise_generique . '_dyn')
454
+			and $file = include_spip('balise/'.strtolower($nom_balise_generique))
455
+			and function_exists('balise_'.$nom_balise_generique.'_dyn')
456 456
 		) {
457 457
 			// et lui injecter en premier arg le nom de la balise
458 458
 			array_unshift($r, $nom);
459 459
 			$nom_balise = $nom_balise_generique;
460 460
 			if (!_DIR_RESTREINT) {
461
-				$file = _DIR_RESTREINT_ABS . $file;
461
+				$file = _DIR_RESTREINT_ABS.$file;
462 462
 			}
463 463
 		} else {
464 464
 			$msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]];
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 		$n = '';
560 560
 		foreach (explode(',', $liste) as $val) {
561 561
 			if ($a = intval($val) and $val === strval($a)) {
562
-				$n .= ',' . $val;
562
+				$n .= ','.$val;
563 563
 			}
564 564
 		}
565 565
 		if (strlen($n)) {
@@ -738,8 +738,8 @@  discard block
 block discarded – undo
738 738
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
739 739
 			$i = 0;
740 740
 			do {
741
-				$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
742
-					[$sous[1] . ' AS id'],
741
+				$where[$k] = remplace_sous_requete($w, '('.calculer_select(
742
+					[$sous[1].' AS id'],
743 743
 					$from,
744 744
 					$from_type,
745 745
 					$wheresub,
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 					$id,
753 753
 					$serveur,
754 754
 					false
755
-				) . ')');
755
+				).')');
756 756
 				if (!$i) {
757 757
 					$i = 1;
758 758
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 		if ($sous[0] == 'SUBSELECT') {
773 773
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
774 774
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
775
-			$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
775
+			$where[$k] = remplace_sous_requete($w, '('.calculer_select(
776 776
 				$sous[1], # select
777 777
 				$sous[2], #from
778 778
 				[], #from_type
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 				$id,
788 788
 				$serveur,
789 789
 				false
790
-			) . ')');
790
+			).')');
791 791
 		}
792 792
 		array_pop($where_simples);
793 793
 	}
@@ -850,15 +850,15 @@  discard block
 block discarded – undo
850 850
 			// sans recours a preg_match
851 851
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
852 852
 			$afrom[$t][$cle] = [
853
-				"\n" .
854
-				($from_type[$cle] ?? 'INNER') . ' JOIN',
853
+				"\n".
854
+				($from_type[$cle] ?? 'INNER').' JOIN',
855 855
 				$from[$cle],
856 856
 				"AS $cle",
857 857
 				'ON (',
858 858
 				"$cle.$c",
859 859
 				'=',
860 860
 				"$t.$carr",
861
-				($and ? 'AND ' . $and : '') .
861
+				($and ? 'AND '.$and : '').
862 862
 				')'
863 863
 			];
864 864
 			if (isset($afrom[$cle])) {
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
 		$t = key($from);
897 897
 		$c = current($from);
898 898
 		reset($from);
899
-		$e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/';
899
+		$e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/';
900 900
 		if (
901 901
 			!(strpos($t, ' ') or // jointure des le depart cf boucle_doc
902 902
 				calculer_jointnul($t, $select, $e) or
@@ -914,7 +914,7 @@  discard block
 block discarded – undo
914 914
 			unset($afrom[$t][$nt]);
915 915
 			$afrom[$nt] = $afrom[$t];
916 916
 			unset($afrom[$t]);
917
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
917
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
918 918
 			$t = $nfrom[4];
919 919
 			$alias = '';
920 920
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -925,14 +925,14 @@  discard block
 block discarded – undo
925 925
 			if ($newcle != $oldcle) {
926 926
 				// si l'ancienne cle etait deja dans le select avec un AS
927 927
 				// reprendre simplement ce AS
928
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
928
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
929 929
 				if (preg_match($as, implode(',', $select), $m)) {
930 930
 					$alias = '';
931 931
 				} else {
932
-					$alias = ', ' . $nfrom[4] . " AS $oldcle";
932
+					$alias = ', '.$nfrom[4]." AS $oldcle";
933 933
 				}
934 934
 			}
935
-			$select = remplacer_jointnul($t . $alias, $select, $e);
935
+			$select = remplacer_jointnul($t.$alias, $select, $e);
936 936
 			$join = remplacer_jointnul($t, $join, $e);
937 937
 			$where = remplacer_jointnul($t, $where, $e);
938 938
 			$having = remplacer_jointnul($t, $having, $e);
@@ -982,9 +982,9 @@  discard block
 block discarded – undo
982 982
 	} else {
983 983
 		$exp = '';
984 984
 		if (strtoupper($join) === 'AND') {
985
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
985
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
986 986
 		} else {
987
-			return $exp . join($join, $v);
987
+			return $exp.join($join, $v);
988 988
 		}
989 989
 	}
990 990
 }
@@ -1046,6 +1046,6 @@  discard block
 block discarded – undo
1046 1046
 	}
1047 1047
 
1048 1048
 	return $mime_type
1049
-	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_'
1050
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1049
+	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_'
1050
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1051 1051
 }
Please login to merge, or discard this patch.
ecrire/auth/spip.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		$row = sql_fetsel(
50 50
 			'*',
51 51
 			'spip_auteurs',
52
-			'login=' . sql_quote($login, $serveur, 'text') . " AND statut<>'5poubelle'",
52
+			'login='.sql_quote($login, $serveur, 'text')." AND statut<>'5poubelle'",
53 53
 			'',
54 54
 			'',
55 55
 			'',
@@ -77,20 +77,20 @@  discard block
 block discarded – undo
77 77
 		// legacy = md5 ou sha256
78 78
 		case 32:
79 79
 			// tres anciens mots de passe encodes en md5(alea.pass)
80
-			$hash = md5($row['alea_actuel'] . $pass);
80
+			$hash = md5($row['alea_actuel'].$pass);
81 81
 			$methode = 'md5';
82 82
 		case 64:
83 83
 			if (empty($hash)) {
84 84
 				// anciens mots de passe encodes en sha256(alea.pass)
85 85
 				include_spip('auth/sha256.inc');
86
-				$hash = spip_sha256($row['alea_actuel'] . $pass);
86
+				$hash = spip_sha256($row['alea_actuel'].$pass);
87 87
 				$methode = 'sha256';
88 88
 			}
89 89
 			if ($row['pass'] === $hash) {
90
-				spip_log("validation du mot de passe pour l'auteur #" . $row['id_auteur'] . " $login via $methode", 'auth' . _LOG_DEBUG);
90
+				spip_log("validation du mot de passe pour l'auteur #".$row['id_auteur']." $login via $methode", 'auth'._LOG_DEBUG);
91 91
 				// ce n'est pas cense arriver, mais si jamais c'est un backup inutilisable, il faut le nettoyer pour ne pas bloquer la creation d'une nouvelle cle d'auth
92 92
 				if (!empty($row['backup_cles'])) {
93
-					sql_updateq('spip_auteurs', ['backup_cles' => ''], 'id_auteur=' . intval($row['id_auteur']));
93
+					sql_updateq('spip_auteurs', ['backup_cles' => ''], 'id_auteur='.intval($row['id_auteur']));
94 94
 				}
95 95
 				break;
96 96
 			}
@@ -108,19 +108,19 @@  discard block
 block discarded – undo
108 108
 				and !empty($row['backup_cles'])
109 109
 			) {
110 110
 				if ($cles->restore($row['backup_cles'], $pass, $row['pass'], $row['id_auteur'])) {
111
-					spip_log('Les cles secretes ont ete restaurées avec le backup du webmestre #' . $row['id_auteur'], 'auth' . _LOG_INFO_IMPORTANTE);
111
+					spip_log('Les cles secretes ont ete restaurées avec le backup du webmestre #'.$row['id_auteur'], 'auth'._LOG_INFO_IMPORTANTE);
112 112
 					if ($cles->save()) {
113 113
 						$secret = $cles->getSecretAuth();
114 114
 					}
115 115
 					else {
116
-						spip_log("Echec restauration des cles : verifier les droits d'ecriture ?", 'auth' . _LOG_ERREUR);
116
+						spip_log("Echec restauration des cles : verifier les droits d'ecriture ?", 'auth'._LOG_ERREUR);
117 117
 						// et on echoue car on ne veut pas que la situation reste telle quelle
118
-						raler_fichier(_DIR_ETC . 'cles.php');
118
+						raler_fichier(_DIR_ETC.'cles.php');
119 119
 					}
120 120
 				}
121 121
 				else {
122
-					spip_log('Pas de cle secrete disponible (fichier config/cle.php absent ?) mais le backup du webmestre #' . $row['id_auteur'] . " n'est pas valide", 'auth' . _LOG_ERREUR);
123
-					sql_updateq('spip_auteurs', ['backup_cles' => ''], 'id_auteur=' . intval($row['id_auteur']));
122
+					spip_log('Pas de cle secrete disponible (fichier config/cle.php absent ?) mais le backup du webmestre #'.$row['id_auteur']." n'est pas valide", 'auth'._LOG_ERREUR);
123
+					sql_updateq('spip_auteurs', ['backup_cles' => ''], 'id_auteur='.intval($row['id_auteur']));
124 124
 				}
125 125
 			}
126 126
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 				unset($row);
129 129
 			}
130 130
 			else {
131
-				spip_log("validation du mot de passe pour l'auteur #" . $row['id_auteur'] . " $login via Password::verifier", 'auth' . _LOG_DEBUG);
131
+				spip_log("validation du mot de passe pour l'auteur #".$row['id_auteur']." $login via Password::verifier", 'auth'._LOG_DEBUG);
132 132
 			}
133 133
 			break;
134 134
 	}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 			@sql_update(
176 176
 				'spip_auteurs',
177 177
 				$set,
178
-				'id_auteur=' . intval($row['id_auteur']) . ' AND pass=' . sql_quote(
178
+				'id_auteur='.intval($row['id_auteur']).' AND pass='.sql_quote(
179 179
 					$row['pass'],
180 180
 					$serveur,
181 181
 					'text'
@@ -223,24 +223,24 @@  discard block
 block discarded – undo
223 223
 
224 224
 	// si force, on ne verifie pas la presence d'un backup chez un webmestre
225 225
 	if ($force) {
226
-		spip_log('Pas de cle secrete disponible, on regenere une nouvelle cle forcee - tous les mots de passe sont invalides', 'auth' . _LOG_INFO_IMPORTANTE);
226
+		spip_log('Pas de cle secrete disponible, on regenere une nouvelle cle forcee - tous les mots de passe sont invalides', 'auth'._LOG_INFO_IMPORTANTE);
227 227
 		$secret = $cles->getSecretAuth(true);
228 228
 		return true;
229 229
 	}
230 230
 
231
-	$has_backup = sql_allfetsel('id_auteur', 'spip_auteurs', 'statut=' . sql_quote('0minirezo') . ' AND webmestre=' . sql_quote('oui') . " AND backup_cles!=''");
231
+	$has_backup = sql_allfetsel('id_auteur', 'spip_auteurs', 'statut='.sql_quote('0minirezo').' AND webmestre='.sql_quote('oui')." AND backup_cles!=''");
232 232
 	$has_backup = array_column($has_backup, 'id_auteur');
233 233
 	if (empty($has_backup)) {
234
-		spip_log("Pas de cle secrete disponible, et aucun webmestre n'a de backup, on regenere une nouvelle cle - tous les mots de passe sont invalides", 'auth' . _LOG_INFO_IMPORTANTE);
234
+		spip_log("Pas de cle secrete disponible, et aucun webmestre n'a de backup, on regenere une nouvelle cle - tous les mots de passe sont invalides", 'auth'._LOG_INFO_IMPORTANTE);
235 235
 		if ($secret = $cles->getSecretAuth(true)) {
236 236
 			return true;
237 237
 		}
238
-		spip_log("Echec generation d'une nouvelle cle : verifier les droits d'ecriture ?", 'auth' . _LOG_ERREUR);
238
+		spip_log("Echec generation d'une nouvelle cle : verifier les droits d'ecriture ?", 'auth'._LOG_ERREUR);
239 239
 		// et on echoue car on ne veut pas que la situation reste telle quelle
240
-		raler_fichier(_DIR_ETC . 'cles.php');
240
+		raler_fichier(_DIR_ETC.'cles.php');
241 241
 	}
242 242
 	else {
243
-		spip_log('Pas de cle secrete disponible (fichier config/cle.php absent ?) un des webmestres #' . implode(', #', $has_backup) . ' doit se connecter pour restaurer son backup des cles', 'auth' . _LOG_ERREUR);
243
+		spip_log('Pas de cle secrete disponible (fichier config/cle.php absent ?) un des webmestres #'.implode(', #', $has_backup).' doit se connecter pour restaurer son backup des cles', 'auth'._LOG_ERREUR);
244 244
 	}
245 245
 	return false;
246 246
 }
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 	$flux['data'] .=
258 258
 		  '<script type="text/javascript">/*<![CDATA[*/'
259 259
 		. "$js\n"
260
-		. "var login_info={'login':'" . $flux['args']['contexte']['var_login'] . "',"
261
-		. "'page_auteur': '" . generer_url_public('informer_auteur') . "',"
260
+		. "var login_info={'login':'".$flux['args']['contexte']['var_login']."',"
261
+		. "'page_auteur': '".generer_url_public('informer_auteur')."',"
262 262
 		. "'informe_auteur_en_cours':false,"
263 263
 		. "'attente_informe':0};"
264 264
 		. "jQuery(function(){jQuery('#var_login').change(actualise_auteur);});"
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 		} else {
302 302
 			$n = sql_countsel(
303 303
 				'spip_auteurs',
304
-				'login=' . sql_quote($new_login) . ' AND id_auteur!=' . intval($id_auteur) . " AND statut!='5poubelle'",
304
+				'login='.sql_quote($new_login).' AND id_auteur!='.intval($id_auteur)." AND statut!='5poubelle'",
305 305
 				'',
306 306
 				'',
307 307
 				$serveur
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 	}
330 330
 	if (
331 331
 		!$id_auteur = intval($id_auteur)
332
-		or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur)
332
+		or !$auteur = sql_fetsel('login', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur)
333 333
 	) {
334 334
 		return false;
335 335
 	}
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 		$anciens = sql_allfetsel(
345 345
 			'id_auteur',
346 346
 			'spip_auteurs',
347
-			'login=' . sql_quote($new_login, $serveur, 'text') . " AND statut='5poubelle'",
347
+			'login='.sql_quote($new_login, $serveur, 'text')." AND statut='5poubelle'",
348 348
 			'',
349 349
 			'',
350 350
 			'',
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 		$r = sql_getfetsel(
379 379
 			'login',
380 380
 			'spip_auteurs',
381
-			"statut<>'5poubelle'" .
382
-			' AND (length(pass)>0)' .
381
+			"statut<>'5poubelle'".
382
+			' AND (length(pass)>0)'.
383 383
 			" AND (login=$l)",
384 384
 			'',
385 385
 			'',
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 		return sql_getfetsel(
399 399
 			'login',
400 400
 			'spip_auteurs',
401
-			"statut<>'5poubelle'" .
402
-			' AND (length(pass)>0)' .
401
+			"statut<>'5poubelle'".
402
+			' AND (length(pass)>0)'.
403 403
 			" AND (login<>'' AND (nom=$l OR email=$l))",
404 404
 			'',
405 405
 			'',
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 
469 469
 	if (
470 470
 		!$id_auteur = intval($id_auteur)
471
-		or !$auteur = sql_fetsel('login, statut, webmestre', 'spip_auteurs', 'id_auteur=' . intval($id_auteur), '', '', '', '', $serveur)
471
+		or !$auteur = sql_fetsel('login, statut, webmestre', 'spip_auteurs', 'id_auteur='.intval($id_auteur), '', '', '', '', $serveur)
472 472
 	) {
473 473
 		return false;
474 474
 	}
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 		or isset($champs['statut'])
530 530
 		or (isset($options['all']) and $options['all'])
531 531
 	) {
532
-		$htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME;
533
-		$htpasswd = _DIR_TMP . _AUTH_USER_FILE;
532
+		$htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME;
533
+		$htpasswd = _DIR_TMP._AUTH_USER_FILE;
534 534
 
535 535
 		// Cette variable de configuration peut etre posee par un plugin
536 536
 		// par exemple acces_restreint ;
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 			and !@file_exists($htaccess)
541 541
 		) {
542 542
 			spip_unlink($htpasswd);
543
-			spip_unlink($htpasswd . '-admin');
543
+			spip_unlink($htpasswd.'-admin');
544 544
 
545 545
 			return;
546 546
 		}
@@ -558,16 +558,16 @@  discard block
 block discarded – undo
558 558
 		);
559 559
 		while ($t = sql_fetch($s)) {
560 560
 			if (strlen($t['login']) and strlen($t['htpass'])) {
561
-				$p1 .= $t['login'] . ':' . $t['htpass'] . "\n";
561
+				$p1 .= $t['login'].':'.$t['htpass']."\n";
562 562
 				if ($t['statut'] == '0minirezo') {
563
-					$p2 .= $t['login'] . ':' . $t['htpass'] . "\n";
563
+					$p2 .= $t['login'].':'.$t['htpass']."\n";
564 564
 				}
565 565
 			}
566 566
 		}
567 567
 		sql_free($s);
568 568
 		if ($p1) {
569 569
 			ecrire_fichier($htpasswd, $p1);
570
-			ecrire_fichier($htpasswd . '-admin', $p2);
570
+			ecrire_fichier($htpasswd.'-admin', $p2);
571 571
 			spip_log("Ecriture de $htpasswd et $htpasswd-admin");
572 572
 		}
573 573
 	}
Please login to merge, or discard this patch.
ecrire/inc/autoriser.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 // mais apres la fonction autoriser()
121 121
 if ($f = find_in_path('mes_fonctions.php')) {
122 122
 	global $dossier_squelettes;
123
-	include_once(_ROOT_CWD . $f);
123
+	include_once(_ROOT_CWD.$f);
124 124
 }
125 125
 
126 126
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 		$qui = $GLOBALS['visiteur_session'] ?: [];
163 163
 		$qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui);
164 164
 	} elseif (is_numeric($qui)) {
165
-		$qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui);
165
+		$qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui);
166 166
 		if (!$qui) {
167 167
 			return false;
168 168
 		}
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 	}
176 176
 
177 177
 	spip_log(
178
-		"autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?',
179
-		'autoriser' . _LOG_DEBUG
178
+		"autoriser $faire $type $id (".($qui['nom'] ?? '').') ?',
179
+		'autoriser'._LOG_DEBUG
180 180
 	);
181 181
 
182 182
 	// passer par objet_type pour avoir les alias
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		(isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier'))
193 193
 		or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier'))
194 194
 	) {
195
-		spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG);
195
+		spip_log("autoriser ($faire, $type, $id, ".($qui['nom'] ?? '').') : OK Exception', 'autoriser'._LOG_DEBUG);
196 196
 		return true;
197 197
 	}
198 198
 
@@ -201,18 +201,18 @@  discard block
 block discarded – undo
201 201
 	// autoriser_faire[_dist], autoriser_defaut[_dist]
202 202
 	$fonctions = $type
203 203
 		? [
204
-			'autoriser_' . $type . '_' . $faire,
205
-			'autoriser_' . $type . '_' . $faire . '_dist',
206
-			'autoriser_' . $type,
207
-			'autoriser_' . $type . '_dist',
208
-			'autoriser_' . $faire,
209
-			'autoriser_' . $faire . '_dist',
204
+			'autoriser_'.$type.'_'.$faire,
205
+			'autoriser_'.$type.'_'.$faire.'_dist',
206
+			'autoriser_'.$type,
207
+			'autoriser_'.$type.'_dist',
208
+			'autoriser_'.$faire,
209
+			'autoriser_'.$faire.'_dist',
210 210
 			'autoriser_defaut',
211 211
 			'autoriser_defaut_dist'
212 212
 		]
213 213
 		: [
214
-			'autoriser_' . $faire,
215
-			'autoriser_' . $faire . '_dist',
214
+			'autoriser_'.$faire,
215
+			'autoriser_'.$faire.'_dist',
216 216
 			'autoriser_defaut',
217 217
 			'autoriser_defaut_dist'
218 218
 		];
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 	}
226 226
 
227 227
 	spip_log(
228
-		"$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'),
229
-		'autoriser' . _LOG_DEBUG
228
+		"$f($faire, $type, $id, ".($qui['nom'] ?? '').') : '.($a ? 'OK' : 'niet'),
229
+		'autoriser'._LOG_DEBUG
230 230
 	);
231 231
 
232 232
 	return $a;
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
376 376
 
377 377
 	// Le visiteur a-t-il un statut prevu par la config ?
378
-	if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) {
378
+	if (strpos($GLOBALS['meta']['preview'], ','.$qui['statut'].',') !== false) {
379 379
 		return test_previsualiser_objet_champ($type, $id, $qui, $opt);
380 380
 	}
381 381
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 				} // pas de champ passe a la demande => NIET
434 434
 				$previsu = explode(',', $c['previsu']);
435 435
 				// regarder si ce statut est autorise pour l'auteur
436
-				if (in_array($opt[$champ] . '/auteur', $previsu)) {
436
+				if (in_array($opt[$champ].'/auteur', $previsu)) {
437 437
 					// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
438 438
 					// sinon l’auteur en session
439 439
 					include_spip('inc/securiser_action');
@@ -447,12 +447,12 @@  discard block
 block discarded – undo
447 447
 
448 448
 					if (!$id_auteur) {
449 449
 						return false;
450
-					} elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) {
450
+					} elseif (autoriser('previsualiser'.$opt[$champ], $type, 0, $id_auteur)) {
451 451
 						// dans ce cas (admin en general), pas de filtrage sur ce statut
452 452
 					} elseif (
453 453
 						!sql_countsel(
454 454
 							'spip_auteurs_liens',
455
-							'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id)
455
+							'id_auteur='.intval($id_auteur).' AND objet='.sql_quote($type).' AND id_objet='.intval($id)
456 456
 						)
457 457
 					) {
458 458
 						return false;
@@ -497,16 +497,16 @@  discard block
 block discarded – undo
497 497
 			// multilinguisme par secteur et objet rattaché à une rubrique
498 498
 			$primary = id_table_objet($type);
499 499
 			if ($table != 'spip_rubriques') {
500
-				$id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id));
500
+				$id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=".intval($id));
501 501
 			} else {
502 502
 				$id_rubrique = $id;
503 503
 			}
504
-			$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
504
+			$id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
505 505
 			if (!$id_secteur > 0) {
506 506
 				$id_secteur = $id_rubrique;
507 507
 			}
508
-			$langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur));
509
-			$langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id));
508
+			$langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.intval($id_secteur));
509
+			$langue_objet = sql_getfetsel('lang', "$table", "$primary=".intval($id));
510 510
 			if ($langue_secteur != $langue_objet) {
511 511
 				// configuration incohérente, on laisse l'utilisateur corriger la situation
512 512
 				return true;
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 			if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques
515 515
 				return false;
516 516
 			} else {
517
-				$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id));
517
+				$id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id));
518 518
 				if ($id_parent != 0) {
519 519
 					// sous-rubriques : pas de choix de langue
520 520
 					return false;
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 
567 567
 	if (!isset($opt['statut'])) {
568 568
 		if (isset($desc['field']['statut'])) {
569
-			$statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id));
569
+			$statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.intval($id));
570 570
 		} else {
571 571
 			$statut = 'publie';
572 572
 		} // pas de statut => publie
@@ -740,11 +740,11 @@  discard block
 block discarded – undo
740 740
 		return false;
741 741
 	}
742 742
 
743
-	if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) {
743
+	if (sql_countsel('spip_rubriques', 'id_parent='.intval($id))) {
744 744
 		return false;
745 745
 	}
746 746
 
747
-	if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) {
747
+	if (sql_countsel('spip_articles', 'id_rubrique='.intval($id)." AND (statut<>'poubelle')")) {
748 748
 		return false;
749 749
 	}
750 750
 
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 	if (!$id) {
782 782
 		return false;
783 783
 	}
784
-	$r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id));
784
+	$r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id));
785 785
 
786 786
 	return
787 787
 		$r
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 				(!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true))
793 793
 				and in_array($qui['statut'], ['0minirezo', '1comite'])
794 794
 				and in_array($r['statut'], ['prop', 'prepa', 'poubelle'])
795
-				and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])
795
+				and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur'])
796 796
 			)
797 797
 		);
798 798
 }
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 		if (!$id) {
851 851
 			return false;
852 852
 		}
853
-		$statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id));
853
+		$statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.intval($id));
854 854
 	}
855 855
 
856 856
 	return
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 		or
862 862
 		($id
863 863
 			and $qui['id_auteur']
864
-			and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']));
864
+			and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']));
865 865
 }
866 866
 
867 867
 
@@ -882,8 +882,8 @@  discard block
 block discarded – undo
882 882
 function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool {
883 883
 	# securite, mais on aurait pas du arriver ici !
884 884
 	if (
885
-		function_exists($f = 'autoriser_' . $type . '_voir')
886
-		or function_exists($f = 'autoriser_' . $type . '_voir_dist')
885
+		function_exists($f = 'autoriser_'.$type.'_voir')
886
+		or function_exists($f = 'autoriser_'.$type.'_voir_dist')
887 887
 	) {
888 888
 		return $f($faire, $type, $id, $qui, $opt);
889 889
 	}
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
 	$n = sql_fetsel(
1015 1015
 		'A.id_article',
1016 1016
 		'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)',
1017
-		"A.statut='publie' AND L.id_auteur=" . sql_quote($id)
1017
+		"A.statut='publie' AND L.id_auteur=".sql_quote($id)
1018 1018
 	);
1019 1019
 
1020 1020
 	return $n ? true : false;
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
 		and $r = sql_allfetsel(
1227 1227
 			'id_objet',
1228 1228
 			'spip_auteurs_liens',
1229
-			'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0"
1229
+			'id_auteur='.intval($id_auteur)." AND objet='rubrique' AND id_objet!=0"
1230 1230
 		)
1231 1231
 		and is_countable($r) ? count($r) : 0
1232 1232
 	) {
@@ -1911,8 +1911,8 @@  discard block
 block discarded – undo
1911 1911
 function auteurs_objet($objet, $id_objet, $cond = '') {
1912 1912
 	$objet = objet_type($objet);
1913 1913
 	$where = [
1914
-		'objet=' . sql_quote($objet),
1915
-		'id_objet=' . intval($id_objet)
1914
+		'objet='.sql_quote($objet),
1915
+		'id_objet='.intval($id_objet)
1916 1916
 	];
1917 1917
 	if (!empty($cond)) {
1918 1918
 		if (is_array($cond)) {
@@ -1947,7 +1947,7 @@  discard block
 block discarded – undo
1947 1947
 	return sql_allfetsel(
1948 1948
 		'id_auteur',
1949 1949
 		'spip_auteurs_liens',
1950
-		"objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '')
1950
+		"objet='article' AND id_objet=".intval($id_article).($cond ? " AND $cond" : '')
1951 1951
 	);
1952 1952
 }
1953 1953
 
Please login to merge, or discard this patch.
ecrire/inc/informer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	include_spip('inc/texte');
21 21
 	$titre = $descriptif = '';
22 22
 	if ($type === 'rubrique') {
23
-		$row = sql_fetsel('titre, descriptif', 'spip_rubriques', 'id_rubrique = ' . intval($id));
23
+		$row = sql_fetsel('titre, descriptif', 'spip_rubriques', 'id_rubrique = '.intval($id));
24 24
 		if ($row) {
25 25
 			$titre = typo($row['titre']);
26 26
 			$descriptif = propre($row['descriptif']);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				include_spip('inc/filtres_images_mini');
43 43
 				$res = image_reduire("<img src='$fid' alt='' />", 100, 48);
44 44
 				if ($res) {
45
-					$res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . '; margin-' . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>";
45
+					$res = "<div class='informer__media' style='float: ".$GLOBALS['spip_lang_right'].'; margin-'.$GLOBALS['spip_lang_right'].": -5px; margin-top: -5px;'>$res</div>";
46 46
 				}
47 47
 			}
48 48
 		}
@@ -64,21 +64,21 @@  discard block
 block discarded – undo
64 64
 		'  '
65 65
 	);
66 66
 
67
-	$js_func = $do . '_selection_titre';
67
+	$js_func = $do.'_selection_titre';
68 68
 
69 69
 	return "<div style='display: none;'>"
70
-	. "<input type='text' id='" . $rac . "_sel' value='$id' />"
71
-	. "<input type='text' id='" . $rac . "_sel2' value=\""
70
+	. "<input type='text' id='".$rac."_sel' value='$id' />"
71
+	. "<input type='text' id='".$rac."_sel2' value=\""
72 72
 	. entites_html($titre)
73 73
 	. '" />'
74 74
 	. '</div>'
75 75
 	. "<div class='informer' style='padding: 5px; border-top: 0px;'>"
76 76
 	. '<div class="informer__item">'
77 77
 	. (!$res ? '' : $res)
78
-	. "<p class='informer__titre'><b>" . safehtml($titre) . '</b></p>'
79
-	. (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . '</div>')
78
+	. "<p class='informer__titre'><b>".safehtml($titre).'</b></p>'
79
+	. (!$descriptif ? '' : "<div class='informer__descriptif'>".safehtml($descriptif).'</div>')
80 80
 	. '</div>'
81
-	. "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>"
81
+	. "<div class='informer__action' style='clear:both; text-align: ".$GLOBALS['spip_lang_right'].";'>"
82 82
 	. "<input type='submit' class='fondo btn submit' value='"
83 83
 	. _T('bouton_choisir')
84 84
 	. "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />"
Please login to merge, or discard this patch.
ecrire/inc/commencer_page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	$titre = '['
91 91
 		. $nom_site_spip
92 92
 		. ']'
93
-		. ($titre ? ' ' . textebrut(typo($titre)) : '');
93
+		. ($titre ? ' '.textebrut(typo($titre)) : '');
94 94
 
95 95
 	return _DOCTYPE_ECRIRE
96 96
 	. html_lang_attributes()
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 function init_body($rubrique = 'accueil', $sous_rubrique = 'accueil', $id_rubrique = '', $menu = true) {
134 134
 
135 135
 	$res = pipeline('body_prive', "<body class='"
136
-		. init_body_class() . ' ' . _request('exec') . "'"
136
+		. init_body_class().' '._request('exec')."'"
137 137
 		. ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : '')
138 138
 		. '>');
139 139
 
Please login to merge, or discard this patch.
ecrire/action/editer_objet.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
  */
77 77
 function objet_modifier($objet, $id, $set = null) {
78 78
 	if (($t = objet_type($objet)) !== $objet) {
79
-		spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE);
79
+		spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE);
80 80
 		$objet = $t;
81 81
 	}
82 82
 	if (
83
-		include_spip('action/editer_' . $objet)
84
-		and function_exists($modifier = $objet . '_modifier')
83
+		include_spip('action/editer_'.$objet)
84
+		and function_exists($modifier = $objet.'_modifier')
85 85
 	) {
86 86
 		return $modifier($id, $set);
87 87
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	$trouver_table = charger_fonction('trouver_table', 'base');
91 91
 	$desc = $trouver_table($table_sql);
92 92
 	if (!$desc or !isset($desc['field'])) {
93
-		spip_log("Objet $objet inconnu dans objet_modifier", 'editer' . _LOG_ERREUR);
93
+		spip_log("Objet $objet inconnu dans objet_modifier", 'editer'._LOG_ERREUR);
94 94
 
95 95
 		return _L("Erreur objet $objet inconnu");
96 96
 	}
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 function objet_inserer($objet, $id_parent = null, $set = null) {
171 171
 	$d = null;
172 172
 	if (($t = objet_type($objet)) !== $objet) {
173
-		spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE);
173
+		spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE);
174 174
 		$objet = $t;
175 175
 	}
176 176
 	if (
177
-		include_spip('action/editer_' . $objet)
178
-		and function_exists($inserer = $objet . '_inserer')
177
+		include_spip('action/editer_'.$objet)
178
+		and function_exists($inserer = $objet.'_inserer')
179 179
 	) {
180 180
 		return $inserer($id_parent, $set);
181 181
 	}
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			$row = sql_fetsel('id_rubrique, id_secteur, lang', 'spip_rubriques', 'id_parent=0', '', '0+titre,titre', '1');
197 197
 			$id_rubrique = $row['id_rubrique'];
198 198
 		} else {
199
-			$row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique));
199
+			$row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique));
200 200
 		}
201 201
 
202 202
 		$champs['id_rubrique'] = $id_rubrique;
@@ -314,12 +314,12 @@  discard block
 block discarded – undo
314 314
  */
315 315
 function objet_instituer($objet, $id, $c, $calcul_rub = true) {
316 316
 	if (($t = objet_type($objet)) !== $objet) {
317
-		spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE);
317
+		spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE);
318 318
 		$objet = $t;
319 319
 	}
320 320
 	if (
321
-		include_spip('action/editer_' . $objet)
322
-		and function_exists($instituer = $objet . '_instituer')
321
+		include_spip('action/editer_'.$objet)
322
+		and function_exists($instituer = $objet.'_instituer')
323 323
 	) {
324 324
 		return $instituer($id, $c, $calcul_rub);
325 325
 	}
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	$sel[] = ($champ_date ? "$champ_date as date" : "'' as date");
349 349
 	$sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : '0 as id_rubrique');
350 350
 
351
-	$row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id));
351
+	$row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.intval($id));
352 352
 
353 353
 	$id_rubrique = $row['id_rubrique'];
354 354
 	$statut_ancien = $statut = $row['statut'];
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 			if ($s != 'publie' and autoriser('modifier', $objet, $id)) {
372 372
 				$statut = $champs['statut'] = $s;
373 373
 			} else {
374
-				spip_log("editer_objet $objet #$id refus " . json_encode($c, JSON_THROW_ON_ERROR), 'editer' . _LOG_INFO_IMPORTANTE);
374
+				spip_log("editer_objet $objet #$id refus ".json_encode($c, JSON_THROW_ON_ERROR), 'editer'._LOG_INFO_IMPORTANTE);
375 375
 			}
376 376
 		}
377 377
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 		and isset($c['id_parent'])
402 402
 		and $id_parent = $c['id_parent']
403 403
 		and $id_parent != $id_rubrique
404
-		and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . intval($id_parent)))
404
+		and (sql_fetsel('1', 'spip_rubriques', 'id_rubrique='.intval($id_parent)))
405 405
 	) {
406 406
 		$champs['id_rubrique'] = $id_parent;
407 407
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 	// Si on deplace l'objet
501 501
 	// changer aussi son secteur et sa langue (si heritee)
502 502
 	if (isset($champs['id_rubrique'])) {
503
-		$row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique']));
503
+		$row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique='.sql_quote($champs['id_rubrique']));
504 504
 		$langue = $row_rub['lang'];
505 505
 
506 506
 		if (isset($desc['field']['id_secteur'])) {
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 				sql_fetsel(
513 513
 					'1',
514 514
 					$table_sql,
515
-					id_table_objet($objet) . '=' . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue)
515
+					id_table_objet($objet).'='.intval($id)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue)
516 516
 				)
517 517
 			) {
518 518
 				$champs['lang'] = $langue;
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 	if (!$champs) {
524 524
 		return;
525 525
 	}
526
-	sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id));
526
+	sql_updateq($table_sql, $champs, id_table_objet($objet).'='.intval($id));
527 527
 
528 528
 	// Changer le statut des rubriques concernees
529 529
 	if ($cond) {
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
  */
568 568
 function objet_lire($objet, $valeur_id, $options = []) {
569 569
 	if (($t = objet_type($objet)) !== $objet) {
570
-		spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE);
570
+		spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE);
571 571
 		$objet = $t;
572 572
 	}
573 573
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 	) {
590 590
 		// Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet.
591 591
 		if (
592
-			include_spip('action/editer_' . $objet)
592
+			include_spip('action/editer_'.$objet)
593 593
 			and function_exists($lire = "{$objet}_lire_champs")
594 594
 		) {
595 595
 			$valeurs = $lire($objet, $valeur_id, $champ_id);
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 
600 600
 			// La condition est appliquée sur le champ désigné par l'utilisateur.
601 601
 			$where = [
602
-				$champ_id . '=' . sql_quote($valeur_id)
602
+				$champ_id.'='.sql_quote($valeur_id)
603 603
 			];
604 604
 
605 605
 			// Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide.
Please login to merge, or discard this patch.
ecrire/inc/bandeau.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$_id = $e['id_table_objet'];
51 51
 			if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) {
52 52
 				$table = $e['table_objet_sql'];
53
-				$row = sql_fetsel('*', $table, "$_id=" . intval($id));
53
+				$row = sql_fetsel('*', $table, "$_id=".intval($id));
54 54
 				if (isset($row['id_rubrique'])) {
55 55
 					$contexte['id_rubrique'] = $row['id_rubrique'];
56 56
 					if (isset($row['id_secteur'])) {
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
 				$boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position)
115 115
 					+ [
116 116
 						$id => new Bouton(
117
-							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '',  // icone
118
-							$infos['titre'],  // titre
117
+							($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone
118
+							$infos['titre'], // titre
119 119
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
120 120
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
121 121
 						)
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 				$boutons_admin = array_slice($boutons_admin, 0, $position)
133 133
 					+ [
134 134
 						$id => new Bouton(
135
-							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '',  // icone
136
-							$infos['titre'],  // titre
135
+							($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone
136
+							$infos['titre'], // titre
137 137
 							(isset($infos['action']) and $infos['action']) ? $infos['action'] : null,
138 138
 							(isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null
139 139
 						)
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		$url = str_replace('&amp;', '&', $url);
221 221
 		while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) {
222 222
 			if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) {
223
-				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique']));
223
+				$contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique']));
224 224
 			}
225 225
 			$val = _request($matches[2], $contexte);
226 226
 			$url = parametre_url($url, $matches[1], $val ?: '', '&');
Please login to merge, or discard this patch.
ecrire/inc/lang.php 1 patch
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 function changer_langue($lang, $liste_langues = null) {
41 41
 
42 42
 	if (is_null($liste_langues)) {
43
-		$liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '') . ',' . ($GLOBALS['meta']['langues_multilingue'] ?? '');
43
+		$liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '').','.($GLOBALS['meta']['langues_multilingue'] ?? '');
44 44
 	} else {
45 45
 		if (is_array($liste_langues)) {
46 46
 			$liste_langues = implode(',', $liste_langues);
47 47
 		}
48 48
 	}
49
-	$liste_langues = ',' . $liste_langues . ',';
49
+	$liste_langues = ','.$liste_langues.',';
50 50
 
51 51
 	// Si la langue demandee n'existe pas, on essaie d'autres variantes
52 52
 	// Exemple : 'pt-br' => 'pt_br' => 'pt'
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	}
193 193
 	foreach ($langues as $l) {
194 194
 		$selected = ($l == $default) ? ' selected=\'selected\'' : '';
195
-		$ret .= "<option value='$l'$selected>[" . $l . '] ' . traduire_nom_langue($l) . "</option>\n";
195
+		$ret .= "<option value='$l'$selected>[".$l.'] '.traduire_nom_langue($l)."</option>\n";
196 196
 	}
197 197
 
198 198
 	if (!test_espace_prive()) {
@@ -210,23 +210,21 @@  discard block
 block discarded – undo
210 210
 		$base,
211 211
 		$cible,
212 212
 		(select_langues($nom_select, $change, $ret)
213
-			. "<noscript><div style='display:inline'><input type='submit' class='fondo' value='" . _T('bouton_changer') . "' /></div></noscript>"),
213
+			. "<noscript><div style='display:inline'><input type='submit' class='fondo' value='"._T('bouton_changer')."' /></div></noscript>"),
214 214
 		" method='post'"
215 215
 	);
216 216
 }
217 217
 
218 218
 function select_langues($nom_select, $change, $options, $label = '') {
219 219
 	static $cpt = 0;
220
-	$id = 'menu_langues' . $cpt++;
220
+	$id = 'menu_langues'.$cpt++;
221 221
 
222 222
 	return
223
-		"<label for='$id'>" . ($label ?: _T('info_langues')) . '</label> ' .
223
+		"<label for='$id'>".($label ?: _T('info_langues')).'</label> '.
224 224
 		"<select name='$nom_select' id='$id' "
225 225
 		. ((!test_espace_prive()) ?
226
-			("class='forml menu_langues'") :
227
-			(($nom_select == 'var_lang_ecrire') ?
228
-				("class='lang_ecrire'") :
229
-				"class='fondl'"))
226
+			("class='forml menu_langues'") : (($nom_select == 'var_lang_ecrire') ?
227
+				("class='lang_ecrire'") : "class='fondl'"))
230 228
 		. $change
231 229
 		. ">\n"
232 230
 		. $options
@@ -352,7 +350,7 @@  discard block
 block discarded – undo
352 350
 		and (!isset($GLOBALS['spip_lang'])
353 351
 			or $GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site'])
354 352
 	) {
355
-		return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues);//@:install
353
+		return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues); //@:install
356 354
 	}
357 355
 	// en theorie là, la globale est définie, sinon c'est un problème.
358 356
 	if (!isset($GLOBALS['spip_lang'])) {
@@ -455,7 +453,7 @@  discard block
 block discarded – undo
455 453
 	if (!isset($GLOBALS['meta']['langue_site'])) {
456 454
 		// Initialisation : le francais si dispo, sinon la premiere langue trouvee
457 455
 		$GLOBALS['meta']['langue_site'] = $tout =
458
-			(!$all_langs or (strpos(',' . _LANGUE_PAR_DEFAUT . ',', (string) ",$all_langs,") !== false))
456
+			(!$all_langs or (strpos(','._LANGUE_PAR_DEFAUT.',', (string) ",$all_langs,") !== false))
459 457
 				? _LANGUE_PAR_DEFAUT : substr($all_langs, 0, strpos($all_langs, ','));
460 458
 		ecrire_meta('langue_site', $tout);
461 459
 	}
Please login to merge, or discard this patch.
ecrire/inc/plugin.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 /** l'adresse du repertoire de telechargement et de decompactage des plugins */
24 24
 if (!defined('_DIR_PLUGINS_AUTO')) {
25
-	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/');
25
+	define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/');
26 26
 }
27 27
 
28 28
 #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins.
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 				if ($dir) {
382 382
 					$dir .= '/';
383 383
 				}
384
-				$dir .= 'procure:' . $procure['nom'];
384
+				$dir .= 'procure:'.$procure['nom'];
385 385
 
386 386
 				$procure['etat'] = '?';
387 387
 				$procure['dir_type'] = $resume['dir_type'];
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 		$plug = $resume['dir'];
566 566
 		$k = $infos[$dir_type][$plug];
567 567
 
568
-		$plug = constant($dir_type) . $plug;
568
+		$plug = constant($dir_type).$plug;
569 569
 		if (!isset($msg[$p])) {
570 570
 			if (isset($resume['erreur']) and $resume['erreur']) {
571 571
 				$msg[$p] = [$resume['erreur']];
@@ -608,10 +608,10 @@  discard block
 block discarded – undo
608 608
 		$list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation'];
609 609
 	} elseif (!$raw) {
610 610
 		foreach ($list as $plug => $msg) {
611
-			$list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug])
612
-				. '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>';
611
+			$list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug])
612
+				. '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>';
613 613
 		}
614
-		$list = '<ul>' . join("\n", $list) . '</ul>';
614
+		$list = '<ul>'.join("\n", $list).'</ul>';
615 615
 	}
616 616
 	if ($raz) {
617 617
 		effacer_meta('plugin_erreur_activation');
@@ -725,13 +725,13 @@  discard block
 block discarded – undo
725 725
 			if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) {
726 726
 				return _T("plugin_{$balise}_{$type}", [
727 727
 					'plugin' => $nom,
728
-					'version' => ' &ge; ' . $minimum
728
+					'version' => ' &ge; '.$minimum
729 729
 				]);
730 730
 			}
731 731
 			if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) {
732 732
 				return _T("plugin_{$balise}_{$type}", [
733 733
 					'plugin' => $nom,
734
-					'version' => ' &gt; ' . $minimum
734
+					'version' => ' &gt; '.$minimum
735 735
 				]);
736 736
 			}
737 737
 		}
@@ -740,13 +740,13 @@  discard block
 block discarded – undo
740 740
 			if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) {
741 741
 				return _T("plugin_{$balise}_{$type}", [
742 742
 					'plugin' => $nom,
743
-					'version' => ' &le; ' . $maximum
743
+					'version' => ' &le; '.$maximum
744 744
 				]);
745 745
 			}
746 746
 			if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) {
747 747
 				return _T("plugin_{$balise}_plugin", [
748 748
 					'plugin' => $nom,
749
-					'version' => ' &lt; ' . $maximum
749
+					'version' => ' &lt; '.$maximum
750 750
 				]);
751 751
 			}
752 752
 		}
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 		include_spip('inc/charger_plugin');
766 766
 		$url = '<br />'	. bouton_telechargement_plugin($url, 'lib');
767 767
 	}*/
768
-	return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>";
768
+	return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>";
769 769
 }
770 770
 
771 771
 
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 	foreach ($plugin_valides as $p => $resume) {
866 866
 		// Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP
867 867
 		if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') {
868
-			$header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : '');
868
+			$header[] = $p.($resume['version'] ? '('.$resume['version'].')' : '');
869 869
 		}
870 870
 		if ($resume['dir']) {
871 871
 			foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) {
@@ -890,11 +890,11 @@  discard block
 block discarded – undo
890 890
 	$header = strtolower(implode(',', $header));
891 891
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
892 892
 		ecrire_fichier(
893
-			_DIR_VAR . 'config.txt',
894
-			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header
893
+			_DIR_VAR.'config.txt',
894
+			(defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header
895 895
 		);
896 896
 	} else {
897
-		@unlink(_DIR_VAR . 'config.txt');
897
+		@unlink(_DIR_VAR.'config.txt');
898 898
 	}
899 899
 	// generer charger_plugins_chemin.php
900 900
 	plugins_precompile_chemin($plugin_valides, $ordre);
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
 			// definir le plugin, donc le path avant l'include du fichier options
949 949
 			// permet de faire des include_spip pour attraper un inc_ du plugin
950 950
 
951
-			$dir = $dir_type . ".'" . $plug . "/'";
951
+			$dir = $dir_type.".'".$plug."/'";
952 952
 
953 953
 			$prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix']));
954 954
 			if (
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
 				if (!$info['chemin']) {
960 960
 					$chemins['public'][] = "_DIR_PLUGIN_$prefix";
961 961
 					$chemins['prive'][] = "_DIR_PLUGIN_$prefix";
962
-					if (is_dir(constant($dir_type) . $plug . '/squelettes/')) {
962
+					if (is_dir(constant($dir_type).$plug.'/squelettes/')) {
963 963
 						$chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'";
964 964
 					}
965 965
 				}
@@ -980,13 +980,13 @@  discard block
 block discarded – undo
980 980
 								$dir = '';
981 981
 							}
982 982
 							if (strlen($dir)) {
983
-								$dir = rtrim($dir, '/') . '/';
983
+								$dir = rtrim($dir, '/').'/';
984 984
 							}
985 985
 							if (!isset($chemin['type']) or $chemin['type'] == 'public') {
986
-								$chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
986
+								$chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
987 987
 							}
988 988
 							if (!isset($chemin['type']) or $chemin['type'] == 'prive') {
989
-								$chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : '');
989
+								$chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : '');
990 990
 							}
991 991
 						}
992 992
 					}
@@ -995,11 +995,11 @@  discard block
 block discarded – undo
995 995
 		}
996 996
 	}
997 997
 	if (count($chemins['public']) or count($chemins['prive'])) {
998
-		$contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode(
998
+		$contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode(
999 999
 			',',
1000 1000
 			array_reverse($chemins['public'])
1001
-		) . "]);\n"
1002
-			. 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n";
1001
+		)."]);\n"
1002
+			. 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n";
1003 1003
 	}
1004 1004
 
1005 1005
 	ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu);
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 					and strpos($dir, ':') === false // exclure le cas des procure:
1049 1049
 					and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml
1050 1050
 				) {
1051
-					if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) {
1051
+					if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) {
1052 1052
 						$info[$charge] = [$file];
1053 1053
 					}
1054 1054
 				}
@@ -1065,7 +1065,7 @@  discard block
 block discarded – undo
1065 1065
 						) {
1066 1066
 							unset($info[$charge][$k]);
1067 1067
 						} else {
1068
-							$_file = $root_dir_type . ".'$plug/$file'";
1068
+							$_file = $root_dir_type.".'$plug/$file'";
1069 1069
 							$contenu[$charge] .= "include_once_check($_file);\n";
1070 1070
 						}
1071 1071
 					}
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 		}
1076 1076
 	}
1077 1077
 
1078
-	$contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options'];
1078
+	$contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options'];
1079 1079
 	$contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons)
1080 1080
 		. plugin_ongletbouton('onglets_plugins', $onglets);
1081 1081
 
@@ -1110,12 +1110,12 @@  discard block
 block discarded – undo
1110 1110
 		define("_UPDATED_$nom", $val);
1111 1111
 		define("_UPDATED_md5_$nom", $md5);
1112 1112
 	}
1113
-	$val = "unserialize('" . str_replace("'", "\'", $val) . "')";
1113
+	$val = "unserialize('".str_replace("'", "\'", $val)."')";
1114 1114
 
1115 1115
 	return
1116 1116
 		"if (!function_exists('$nom')) {\n"
1117 1117
 		. "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n"
1118
-		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n"
1118
+		. "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n"
1119 1119
 		. "}\n";
1120 1120
 }
1121 1121
 
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 	if (@is_readable(_CACHE_PLUGINS_OPT)) {
1139 1139
 		include_once(_CACHE_PLUGINS_OPT);
1140 1140
 	} else {
1141
-		spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT);
1141
+		spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT);
1142 1142
 	}
1143 1143
 }
1144 1144
 
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 			$dir_type = $plugin_valides[$p]['dir_type'];
1176 1176
 			$root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type);
1177 1177
 			$plug = $plugin_valides[$p]['dir'];
1178
-			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_');
1178
+			$prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_');
1179 1179
 			if (isset($info['pipeline']) and is_array($info['pipeline'])) {
1180 1180
 				foreach ($info['pipeline'] as $pipe) {
1181 1181
 					$nom = $pipe['nom'];
@@ -1209,7 +1209,7 @@  discard block
 block discarded – undo
1209 1209
 						}
1210 1210
 						if (isset($pipe['inclure'])) {
1211 1211
 							$GLOBALS['spip_matrice']["$prefix$action"] =
1212
-								"$root_dir_type:$plug/" . $pipe['inclure'];
1212
+								"$root_dir_type:$plug/".$pipe['inclure'];
1213 1213
 						}
1214 1214
 					}
1215 1215
 				}
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
 					$prepend_code['taches_generales_cron'] = '';
1220 1220
 				}
1221 1221
 				foreach ($info['genie'] as $genie) {
1222
-					$nom = $prefix . $genie['nom'];
1222
+					$nom = $prefix.$genie['nom'];
1223 1223
 					$periode = max(60, intval($genie['periode']));
1224 1224
 					if (charger_fonction($nom, 'genie', true)) {
1225 1225
 						$prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n";
@@ -1237,13 +1237,13 @@  discard block
 block discarded – undo
1237 1237
 				}
1238 1238
 				foreach ($info['style'] as $style) {
1239 1239
 					if (isset($style['path']) and $style['path']) {
1240
-						$code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) ";
1240
+						$code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) ";
1241 1241
 					} else {
1242
-						$code = "if (\$f='" . addslashes($style['url']) . "') ";
1242
+						$code = "if (\$f='".addslashes($style['url'])."') ";
1243 1243
 					}
1244 1244
 					$code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\"";
1245 1245
 					if (isset($style['media']) and strlen($style['media'])) {
1246
-						$code .= ' media="' . addslashes($style['media']) . '"';
1246
+						$code .= ' media="'.addslashes($style['media']).'"';
1247 1247
 					}
1248 1248
 					$code .= "/>';\n";
1249 1249
 					if ($style['type'] != 'prive') {
@@ -1263,9 +1263,9 @@  discard block
 block discarded – undo
1263 1263
 			if (isset($info['script']) and is_countable($info['script']) ? count($info['script']) : 0) {
1264 1264
 				foreach ($info['script'] as $script) {
1265 1265
 					if (isset($script['path']) and $script['path']) {
1266
-						$code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) ";
1266
+						$code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) ";
1267 1267
 					} else {
1268
-						$code = "if (\$f='" . addslashes($script['url']) . "') ";
1268
+						$code = "if (\$f='".addslashes($script['url'])."') ";
1269 1269
 					}
1270 1270
 					$code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n";
1271 1271
 					if ($script['type'] != 'prive') {
@@ -1328,10 +1328,10 @@  discard block
 block discarded – undo
1328 1328
 		unset($GLOBALS['spip_pipeline']['all']);
1329 1329
 		$all_pipes = trim(array_shift($a));
1330 1330
 		if ($all_pipes) {
1331
-			$all_pipes = '|' . ltrim($all_pipes, '|');
1331
+			$all_pipes = '|'.ltrim($all_pipes, '|');
1332 1332
 		}
1333 1333
 		if (count($a)) {
1334
-			$all_pipes_end = '||' . array_shift($a);
1334
+			$all_pipes_end = '||'.array_shift($a);
1335 1335
 		}
1336 1336
 	}
1337 1337
 	$content = '';
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 		// Eclater le pipeline en filtres et appliquer chaque filtre
1349 1349
 		foreach ($pipe as $fonc) {
1350 1350
 			$fonc = trim($fonc);
1351
-			$s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n";
1351
+			$s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n";
1352 1352
 			if (isset($GLOBALS['spip_matrice'][$fonc])) {
1353 1353
 				$file = $GLOBALS['spip_matrice'][$fonc];
1354 1354
 				$file = "'$file'";
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 					if (defined($root_dir)) {
1360 1360
 						$dir = $root_dir;
1361 1361
 					}
1362
-					$file = str_replace($regs[0], "'." . $dir . ".'", $file);
1362
+					$file = str_replace($regs[0], "'.".$dir.".'", $file);
1363 1363
 					$file = str_replace("''.", '', $file);
1364 1364
 					$file = str_replace(constant($dir), '', $file);
1365 1365
 				}
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 		$content .= "// Pipeline $action \n"
1373 1373
 			. "function execute_pipeline_$action(&\$val){\n"
1374 1374
 			. $s_inc
1375
-			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '')
1375
+			. ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '')
1376 1376
 			. $s_call
1377 1377
 			. "return \$val;\n}\n";
1378 1378
 	}
@@ -1428,9 +1428,9 @@  discard block
 block discarded – undo
1428 1428
 					$result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec'));
1429 1429
 					if (_IS_CLI) {
1430 1430
 						include_spip('inc/filtres');
1431
-						$trace = ltrim(textebrut($trace) . "\n" . $result);
1432
-						$trace = '    ' . str_replace("\n", "\n    ", $trace);
1433
-						echo "\n" . ($ok ? 'OK  ' : '/!\ ') . textebrut($titre) . "\n",
1431
+						$trace = ltrim(textebrut($trace)."\n".$result);
1432
+						$trace = '    '.str_replace("\n", "\n    ", $trace);
1433
+						echo "\n".($ok ? 'OK  ' : '/!\ ').textebrut($titre)."\n",
1434 1434
 						  $trace,
1435 1435
 						  "\n";
1436 1436
 					}
@@ -1465,15 +1465,15 @@  discard block
 block discarded – undo
1465 1465
 		$GLOBALS['fichier_php_compile_recent'] = 0;
1466 1466
 	}
1467 1467
 
1468
-	$contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>';
1468
+	$contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>';
1469 1469
 	// si un fichier existe deja on verifie que son contenu change avant de l'ecraser
1470 1470
 	// si pas de modif on ne touche pas au fichier initial
1471 1471
 	if (file_exists($nom)) {
1472 1472
 		if (substr($nom, -4) == '.php') {
1473
-			$fichier_tmp = substr($nom, 0, -4) . '.tmp.php';
1473
+			$fichier_tmp = substr($nom, 0, -4).'.tmp.php';
1474 1474
 		}
1475 1475
 		else {
1476
-			$fichier_tmp = $nom . '.tmp';
1476
+			$fichier_tmp = $nom.'.tmp';
1477 1477
 		}
1478 1478
 		file_put_contents($fichier_tmp, $contenu);
1479 1479
 		if (md5_file($nom) == md5_file($fichier_tmp)) {
Please login to merge, or discard this patch.