Completed
Push — master ( 11381c...fc67b6 )
by cam
01:49
created
ecrire/public/styliser_par_z.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			$apl_constant = '_Z_AJAX_PARALLEL_LOAD';
53 53
 			$page = _SPIP_PAGE;
54 54
 			$echafauder = charger_fonction('echafauder', 'public', true);
55
-			define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist' . (defined('_DIR_PLUGIN_DIST') ? '|\b' . rtrim(
55
+			define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist'.(defined('_DIR_PLUGIN_DIST') ? '|\b'.rtrim(
56 56
 				(string) _DIR_PLUGIN_DIST,
57 57
 				'/'
58 58
 			) : ''));
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			&& in_array($dir, $z_blocs) // verifier deja qu'on est dans un bloc Z
77 77
 			&& defined($apl_constant)
78 78
 			&& in_array($dir, explode(',', (string) constant($apl_constant))) // et dans un demande en APL
79
-			&& ($pipe = z_trouver_bloc($prefix_path . $prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL
79
+			&& ($pipe = z_trouver_bloc($prefix_path.$prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL
80 80
 		) {
81 81
 			$flux['data'] = $pipe;
82 82
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			$echafauder = '';
90 90
 		}
91 91
 		if ($prepend) {
92
-			$squelette = substr((string) find_in_path($prefix_path . $prepend . "$fond.$ext"), 0, -strlen(".$ext"));
92
+			$squelette = substr((string) find_in_path($prefix_path.$prepend."$fond.$ext"), 0, -strlen(".$ext"));
93 93
 			if ($squelette) {
94 94
 				$flux['data'] = $squelette;
95 95
 			}
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 				// se brancher sur contenu/xx si il existe
110 110
 				// ou si c'est un objet spip, associe a une table, utiliser le fond homonyme
111 111
 				if (!isset($disponible[$fond])) {
112
-					$disponible[$fond] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $fond, $ext, (bool) $echafauder);
112
+					$disponible[$fond] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $fond, $ext, (bool) $echafauder);
113 113
 				}
114 114
 
115 115
 				if ($disponible[$fond]) {
116
-					$flux['data'] = substr((string) find_in_path($prefix_path . "page.$ext"), 0, -strlen(".$ext"));
116
+					$flux['data'] = substr((string) find_in_path($prefix_path."page.$ext"), 0, -strlen(".$ext"));
117 117
 				}
118 118
 			}
119 119
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 					$type = $flux['args']['contexte'][$page];
127 127
 				}
128 128
 				if (!isset($disponible[$type])) {
129
-					$disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
129
+					$disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, (bool) $echafauder);
130 130
 				}
131 131
 				if (is_string($disponible[$type])) {
132 132
 					$flux['data'] = $disponible[$type];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 					$flux['data'] = $echafauder($type, $is[0], $is[1], $is[2], $ext);
142 142
 				} else {
143 143
 					$flux['data'] = ($disponible['404'] = z_contenu_disponible(
144
-						$prefix_path . $prepend,
144
+						$prefix_path.$prepend,
145 145
 						$z_contenu,
146 146
 						'404',
147 147
 						$ext,
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
 						$type = $flux['args']['contexte'][$page];
166 166
 					}
167 167
 					if ($type !== 'page' && !isset($disponible[$type])) {
168
-						$disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, (bool) $echafauder);
168
+						$disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, (bool) $echafauder);
169 169
 					}
170 170
 					if ($type == 'page' || $disponible[$type]) {
171
-						$flux['data'] = z_trouver_bloc($prefix_path . $prepend, $dir, 'dist', $ext);
171
+						$flux['data'] = z_trouver_bloc($prefix_path.$prepend, $dir, 'dist', $ext);
172 172
 					}
173 173
 				}
174 174
 			}
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 			if (
186 186
 				isset($flux['args']['contexte']['type-page'])
187 187
 				&& (
188
-					isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page'] . '-' . $flux['args']['contexte']['composition']) . ".$ext")
189
-					|| file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page']) . ".$ext")
188
+					isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette.'-'.$flux['args']['contexte']['type-page'].'-'.$flux['args']['contexte']['composition']).".$ext")
189
+					|| file_exists(($f = $squelette.'-'.$flux['args']['contexte']['type-page']).".$ext")
190 190
 				)
191 191
 			) {
192 192
 				$flux['data'] = $f;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		} elseif (
195 195
 			$fond == 'structure'
196 196
 			&& z_sanitize_var_zajax()
197
-			&& ($f = find_in_path($prefix_path . $prepend . 'ajax' . ".$ext"))
197
+			&& ($f = find_in_path($prefix_path.$prepend.'ajax'.".$ext"))
198 198
 		) {
199 199
 			$flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
200 200
 		} elseif (
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			&& ($dir = explode('/', $dir))
206 206
 			&& ($dir = reset($dir))
207 207
 			&& in_array($dir, $z_blocs)
208
-			&& ($f = find_in_path($prefix_path . $prepend . $fond . '-' . $flux['args']['contexte']['composition'] . ".$ext"))
208
+			&& ($f = find_in_path($prefix_path.$prepend.$fond.'-'.$flux['args']['contexte']['composition'].".$ext"))
209 209
 		) {
210 210
 			$flux['data'] = substr((string) $f, 0, -strlen(".$ext"));
211 211
 		}
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
  *   `true` si on peut l'utiliser, `false` sinon.
266 266
  **/
267 267
 function z_fond_valide($squelette) {
268
-	return !_ZCORE_EXCLURE_PATH || !preg_match(',(' . _ZCORE_EXCLURE_PATH . ')/,', $squelette);
268
+	return !_ZCORE_EXCLURE_PATH || !preg_match(',('._ZCORE_EXCLURE_PATH.')/,', $squelette);
269 269
 }
270 270
 
271 271
 /**
@@ -380,23 +380,23 @@  discard block
 block discarded – undo
380 380
 		}
381 381
 		$dir = z_blocs(test_espace_prive());
382 382
 		$dir = reset($dir);
383
-		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/" . $fond . ',objet=' . $type . ',id_objet=#' . strtoupper((string) $primary) . ',env}>';
383
+		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/".$fond.',objet='.$type.',id_objet=#'.strtoupper((string) $primary).',env}>';
384 384
 	} // page objets
385 385
 	elseif (($type = $desc_exec) && !str_contains($type, '/')) {
386 386
 		$dir = z_blocs(test_espace_prive());
387 387
 		$dir = reset($dir);
388
-		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=" . $type . ',env} />';
388
+		$scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=".$type.',env} />';
389 389
 	}
390 390
 	// morceau d'objet : on fournit le fond de sibstitution dans $desc_exec
391 391
 	// et objet et tire de $table
392 392
 	elseif ($fond = $desc_exec) {
393 393
 		$dir = md5(dirname($fond));
394
-		$scaffold = "<INCLURE{fond=$fond,objet=" . objet_type($table) . ',env} />';
394
+		$scaffold = "<INCLURE{fond=$fond,objet=".objet_type($table).',env} />';
395 395
 	}
396 396
 
397 397
 	$base_dir = sous_repertoire(_DIR_CACHE, 'scaffold', false);
398 398
 	$base_dir = sous_repertoire($base_dir, $dir, false);
399
-	$f = $base_dir . "$exec";
399
+	$f = $base_dir."$exec";
400 400
 	ecrire_fichier("$f.$ext", $scaffold);
401 401
 
402 402
 	return $f;
Please login to merge, or discard this patch.
ecrire/public/decompiler.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	$type .= ($struct->type_requete ?: $struct->type_table_optionnelle);
31 31
 
32 32
 	if ($struct->jointures_explicites) {
33
-		$type .= ' ' . $struct->jointures_explicites;
33
+		$type .= ' '.$struct->jointures_explicites;
34 34
 	}
35 35
 	if ($struct->table_optionnelle) {
36 36
 		$type .= '?';
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
 	$crit = $struct->param;
41 41
 	if ($crit && !is_array($crit[0])) {
42
-		$type = strtolower($type) . array_shift($crit);
42
+		$type = strtolower($type).array_shift($crit);
43 43
 	}
44 44
 	$crit = decompiler_criteres($struct, $fmt, $prof);
45 45
 
46
-	$f = 'format_boucle_' . $fmt;
46
+	$f = 'format_boucle_'.$fmt;
47 47
 
48 48
 	return $f($preaff, $avant, $nom, $type, $crit, $milieu, $apres, $altern, $postaff, $prof);
49 49
 }
@@ -56,21 +56,20 @@  discard block
 block discarded – undo
56 56
 			$res[] = decompiler_($v, $fmt, $prof);
57 57
 		}
58 58
 	}
59
-	$file = is_string($struct->texte) ? $struct->texte :
60
-		decompiler_($struct->texte, $fmt, $prof);
61
-	$f = 'format_inclure_' . $fmt;
59
+	$file = is_string($struct->texte) ? $struct->texte : decompiler_($struct->texte, $fmt, $prof);
60
+	$f = 'format_inclure_'.$fmt;
62 61
 
63 62
 	return $f($file, $res, $prof);
64 63
 }
65 64
 
66 65
 function decompiler_texte($struct, $fmt = '', $prof = 0) {
67
-	$f = 'format_texte_' . $fmt;
66
+	$f = 'format_texte_'.$fmt;
68 67
 
69 68
 	return strlen((string) $struct->texte) ? $f($struct->texte, $prof) : '';
70 69
 }
71 70
 
72 71
 function decompiler_polyglotte($struct, $fmt = '', $prof = 0) {
73
-	$f = 'format_polyglotte_' . $fmt;
72
+	$f = 'format_polyglotte_'.$fmt;
74 73
 
75 74
 	return $f($struct->traductions, $prof);
76 75
 }
@@ -83,7 +82,7 @@  discard block
 block discarded – undo
83 82
 
84 83
 	$filtres = decompiler_liste($struct->param, $fmt, $prof);
85 84
 
86
-	$f = 'format_idiome_' . $fmt;
85
+	$f = 'format_idiome_'.$fmt;
87 86
 
88 87
 	return $f($struct->nom_champ, $struct->module, $args, $filtres, $prof);
89 88
 }
@@ -98,7 +97,7 @@  discard block
 block discarded – undo
98 97
 		}
99 98
 		$filtres = decompiler_liste($p, $fmt, $prof);
100 99
 	}
101
-	$f = 'format_champ_' . $fmt;
100
+	$f = 'format_champ_'.$fmt;
102 101
 
103 102
 	return $f($struct->nom_champ, $struct->nom_boucle, $struct->etoile, $avant, $apres, $args, $filtres, $prof);
104 103
 }
@@ -107,7 +106,7 @@  discard block
 block discarded – undo
107 106
 	if (!is_array($sources)) {
108 107
 		return '';
109 108
 	}
110
-	$f = 'format_liste_' . $fmt;
109
+	$f = 'format_liste_'.$fmt;
111 110
 	$res = '';
112 111
 	foreach ($sources as $arg) {
113 112
 		if (!is_array($arg)) {
@@ -124,7 +123,7 @@  discard block
 block discarded – undo
124 123
 				&& strlen((string) $v[0]->apres) == 1
125 124
 				&& $v[0]->apres == $v[0]->avant
126 125
 			) {
127
-				$args[] = $v[0]->avant . $v[0]->texte . $v[0]->apres;
126
+				$args[] = $v[0]->avant.$v[0]->texte.$v[0]->apres;
128 127
 			} else {
129 128
 				$args[] = decompiler_($v, $fmt, 0 - $prof);
130 129
 			}
@@ -147,7 +146,7 @@  discard block
 block discarded – undo
147 146
 		return '';
148 147
 	}
149 148
 	$res = '';
150
-	$f = 'format_critere_' . $fmt;
149
+	$f = 'format_critere_'.$fmt;
151 150
 	foreach ($sources as $crit) {
152 151
 		if (!is_array($crit)) {
153 152
 			continue;
@@ -160,13 +159,13 @@  discard block
 block discarded – undo
160 159
 				&& $v[0]->type == 'texte'
161 160
 				&& $v[0]->apres
162 161
 			) {
163
-				$args[] = [['texte', ($v[0]->apres . $v[0]->texte . $v[0]->apres)]];
162
+				$args[] = [['texte', ($v[0]->apres.$v[0]->texte.$v[0]->apres)]];
164 163
 			} else {
165 164
 				$res2 = [];
166 165
 				foreach ($v as $k => $p) {
167 166
 					if (
168 167
 						isset($p->type)
169
-						&& function_exists($d = 'decompiler_' . $p->type)
168
+						&& function_exists($d = 'decompiler_'.$p->type)
170 169
 					) {
171 170
 						$r = $d($p, $fmt, (0 - $prof));
172 171
 						$res2[] = [$p->type, $r];
@@ -194,7 +193,7 @@  discard block
 block discarded – undo
194 193
 		if (!isset($p->type)) {
195 194
 			continue;
196 195
 		} #??????
197
-		$d = 'decompiler_' . $p->type;
196
+		$d = 'decompiler_'.$p->type;
198 197
 		$next = $liste[$k + 1] ?? false;
199 198
 		// Forcer le champ etendu si son source (pas les reecritures)
200 199
 		// contenait des args et s'il est suivi d'espaces,
@@ -219,16 +218,16 @@  discard block
 block discarded – undo
219 218
 		}
220 219
 		$contenu[] = [$d($p, $fmt, $prof2), $p->type];
221 220
 	}
222
-	$f = 'format_suite_' . $fmt;
221
+	$f = 'format_suite_'.$fmt;
223 222
 
224 223
 	return $f($contenu);
225 224
 }
226 225
 
227 226
 function public_decompiler($liste, $fmt = '', $prof = 0, $quoi = '') {
228
-	if (!include_spip('public/format_' . $fmt)) {
227
+	if (!include_spip('public/format_'.$fmt)) {
229 228
 		return "'$fmt'?";
230 229
 	}
231
-	$f = 'decompiler_' . $quoi;
230
+	$f = 'decompiler_'.$quoi;
232 231
 
233 232
 	return $f($liste, $fmt, $prof);
234 233
 }
Please login to merge, or discard this patch.
ecrire/public/compiler.php 1 patch
Spacing   +108 added lines, -117 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 						: calculer_liste($val, $p->descr, $boucles, $id_boucle);
124 124
 					if ($var !== 1) {
125 125
 						$val = ($echap ? "\'$var\' => ' . argumenter_squelette(" : "'$var' => ")
126
-							. $val . ($echap ? ") . '" : ' ');
126
+							. $val.($echap ? ") . '" : ' ');
127 127
 					} else {
128 128
 						$val = $echap ? "'.$val.'" : $val;
129 129
 					}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	if (!$lang) {
145 145
 		$lang = '$GLOBALS["spip_lang"]';
146 146
 	}
147
-	$l['lang'] = ($echap ? "\'lang\' => ' . argumenter_squelette(" : "'lang' => ") . $lang . ($echap ? ") . '" : ' ');
147
+	$l['lang'] = ($echap ? "\'lang\' => ' . argumenter_squelette(" : "'lang' => ").$lang.($echap ? ") . '" : ' ');
148 148
 
149 149
 	return $l;
150 150
 }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	$_contexte = argumenter_inclure($p->param, false, $p, $boucles, $id_boucle, true, '', true);
175 175
 	if (is_string($p->texte)) {
176 176
 		$fichier = $p->texte;
177
-		$code = '"' . str_replace('"', '\"', $fichier) . '"';
177
+		$code = '"'.str_replace('"', '\"', $fichier).'"';
178 178
 	} else {
179 179
 		$code = calculer_liste($p->texte, $p->descr, $boucles, $id_boucle);
180 180
 		if ($code && preg_match("/^'([^']*)'/s", $code, $r)) {
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 		return false;
224 224
 	} // j'aurais voulu toucher le fond ...
225 225
 
226
-	$contexte = 'array(' . $_contexte . ')';
226
+	$contexte = 'array('.$_contexte.')';
227 227
 
228 228
 	if ($env) {
229 229
 		$contexte = "array_merge('.var_export(\$Pile[0],1).',$contexte)";
@@ -238,16 +238,16 @@  discard block
 block discarded – undo
238 238
 			$_options[] = $ajax;
239 239
 		}
240 240
 		$code = " ' . argumenter_squelette($code) . '";
241
-		$code = 'echo ' . sprintf(
241
+		$code = 'echo '.sprintf(
242 242
 			CODE_RECUPERER_FOND,
243 243
 			$code,
244 244
 			$contexte,
245 245
 			implode(',', $_options),
246 246
 			"_request(\\'connect\\') ?? \\'\\'"
247
-		) . ';';
247
+		).';';
248 248
 	}
249 249
 
250
-	return "\n'<'.'" . '?php ' . $code . "\n?'." . "'>'";
250
+	return "\n'<'.'".'?php '.$code."\n?'."."'>'";
251 251
 }
252 252
 
253 253
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 					$id = $id_table;
328 328
 					$statut = preg_replace(',\W,', '', $s['champ']); // securite
329 329
 				}
330
-				$mstatut = $id . '.' . $statut;
330
+				$mstatut = $id.'.'.$statut;
331 331
 
332 332
 				$arg_ignore_previsu = ($ignore_previsu ? ',true' : '');
333 333
 				include_spip('public/quete');
@@ -336,11 +336,11 @@  discard block
 block discarded – undo
336 336
 					&& $s['post_date']
337 337
 					&& $GLOBALS['meta']['post_dates'] == 'non'
338 338
 				) {
339
-					$date = $id . '.' . preg_replace(',\W,', '', $s['post_date']); // securite
339
+					$date = $id.'.'.preg_replace(',\W,', '', $s['post_date']); // securite
340 340
 					array_unshift(
341 341
 						$boucle->where,
342 342
 						$echapper ?
343
-							"\nquete_condition_postdates('$date'," . _q($boucle->sql_serveur) . "$arg_ignore_previsu)"
343
+							"\nquete_condition_postdates('$date',"._q($boucle->sql_serveur)."$arg_ignore_previsu)"
344 344
 							:
345 345
 							quete_condition_postdates($date, $boucle->sql_serveur, $ignore_previsu)
346 346
 					);
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
 					$boucle->where,
350 350
 					$echapper ?
351 351
 						"\nquete_condition_statut('$mstatut',"
352
-						. _q($s['previsu']) . ','
353
-						. _q($s['publie']) . ','
354
-						. _q($boucle->sql_serveur) . "$arg_ignore_previsu)"
352
+						. _q($s['previsu']).','
353
+						. _q($s['publie']).','
354
+						. _q($boucle->sql_serveur)."$arg_ignore_previsu)"
355 355
 						:
356 356
 						quete_condition_statut($mstatut, $s['previsu'], $s['publie'], $boucle->sql_serveur, $ignore_previsu)
357 357
 				);
@@ -385,14 +385,14 @@  discard block
 block discarded – undo
385 385
 	if (_request('var_mode_affiche') != 'resultat') {
386 386
 		$trace = '';
387 387
 	} else {
388
-		$_trace = $boucles[$id_boucle]->descr['nom'] . $id_boucle;
388
+		$_trace = $boucles[$id_boucle]->descr['nom'].$id_boucle;
389 389
 		$_trace = "\$GLOBALS['debug_objets']['resultat']['$_trace']";
390 390
 		$trace = "
391 391
 		if (empty($_trace)) {
392 392
 			$_trace = [];
393 393
 		}
394 394
 		if (count($_trace) < 3) {
395
-			$_trace" . '[] = $t0;
395
+			$_trace".'[] = $t0;
396 396
 		}';
397 397
 	}
398 398
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 	return
427 427
 		// Numrows[$nom] peut ne pas être encore defini
428 428
 		"\n\t\$save_numrows = (isset(\$Numrows['$nom']) ? \$Numrows['$nom'] : array());"
429
-		. "\n\t\$t0 = " . $boucles[$id_boucle]->return . ';'
429
+		. "\n\t\$t0 = ".$boucles[$id_boucle]->return.';'
430 430
 		. "\n\t\$Numrows['$nom'] = (\$save_numrows);"
431 431
 		. $trace
432 432
 		. "\n\treturn \$t0;";
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 	// faudrait expanser le foreach a la compil, car y en a souvent qu'un
495 495
 	// et puis faire un [] plutot qu'un "','."
496 496
 	if ($boucle->doublons) {
497
-		$corps .= "\n\t\t\tforeach(" . $boucle->doublons . ' as $k) $doublons[$k] .= "," . ' .
497
+		$corps .= "\n\t\t\tforeach(".$boucle->doublons.' as $k) $doublons[$k] .= "," . '.
498 498
 			index_pile($id_boucle, $primary, $boucles)
499 499
 			. "; // doublons\n";
500 500
 	}
@@ -522,13 +522,13 @@  discard block
 block discarded – undo
522 522
 		$corps .=
523 523
 			"\n\t\tlang_select_public("
524 524
 			. index_pile($id_boucle, 'lang', $boucles)
525
-			. ", '" . $boucle->lang_select . "'"
525
+			. ", '".$boucle->lang_select."'"
526 526
 			. (in_array($type_boucle, [
527 527
 				'articles',
528 528
 				'rubriques',
529 529
 				'hierarchie',
530 530
 				'breves'
531
-			]) ? ', ' . index_pile($id_boucle, 'titre', $boucles) : '')
531
+			]) ? ', '.index_pile($id_boucle, 'titre', $boucles) : '')
532 532
 			. ');';
533 533
 	} else {
534 534
 		$init_lang = '';
@@ -550,20 +550,16 @@  discard block
 block discarded – undo
550 550
 
551 551
 	// gestion optimale des separateurs et des boucles constantes
552 552
 	if (is_countable($boucle->separateur) ? count($boucle->separateur) : 0) {
553
-		$code_sep = ("'" . str_replace("'", "\'", join('', $boucle->separateur)) . "'");
553
+		$code_sep = ("'".str_replace("'", "\'", join('', $boucle->separateur))."'");
554 554
 	}
555 555
 
556 556
 	$corps .=
557 557
 		((!$boucle->separateur) ?
558
-			(($constant && !$corps && !$flag_cpt) ? $return :
559
-				(($return === "''") ? '' :
560
-					("\n\t\t" . '$t0 .= ' . $return . ';'))) :
561
-			("\n\t\t\$t1 " .
558
+			(($constant && !$corps && !$flag_cpt) ? $return : (($return === "''") ? '' : ("\n\t\t".'$t0 .= '.$return.';'))) : ("\n\t\t\$t1 ".
562 559
 				((str_starts_with($return, '$t1.')) ?
563
-					('.=' . substr($return, 4)) :
564
-					('= ' . $return)) .
565
-				";\n\t\t" .
566
-				'$t0 .= ((strlen($t1) && strlen($t0)) ? ' . $code_sep . " : '') . \$t1;"));
560
+					('.='.substr($return, 4)) : ('= '.$return)).
561
+				";\n\t\t".
562
+				'$t0 .= ((strlen($t1) && strlen($t0)) ? '.$code_sep." : '') . \$t1;"));
567 563
 
568 564
 	// Calculer les invalideurs si c'est une boucle non constante et si on
569 565
 	// souhaite invalider ces elements
@@ -645,7 +641,7 @@  discard block
 block discarded – undo
645 641
 		$corps,
646 642
 		$fin_lang,
647 643
 		$trace,
648
-		'BOUCLE' . $id_boucle . ' @ ' . ($boucle->descr['sourcefile'])
644
+		'BOUCLE'.$id_boucle.' @ '.($boucle->descr['sourcefile'])
649 645
 	);
650 646
 
651 647
 	return $a;
@@ -665,25 +661,24 @@  discard block
 block discarded – undo
665 661
  **/
666 662
 function calculer_requete_sql($boucle) {
667 663
 	$init = [];
668
-	$init[] = calculer_dec('table', "'" . $boucle->id_table . "'");
669
-	$init[] = calculer_dec('id', "'" . $boucle->id_boucle . "'");
664
+	$init[] = calculer_dec('table', "'".$boucle->id_table."'");
665
+	$init[] = calculer_dec('id', "'".$boucle->id_boucle."'");
670 666
 	# En absence de champ c'est un decompte :
671 667
 	$init[] = calculer_dec('from', calculer_from($boucle));
672 668
 	$init[] = calculer_dec('type', calculer_from_type($boucle));
673 669
 	$init[] = calculer_dec(
674 670
 		'groupby',
675
-		'array(' . (($g = join("\",\n\t\t\"", $boucle->group)) ? '"' . $g . '"' : '') . ')'
671
+		'array('.(($g = join("\",\n\t\t\"", $boucle->group)) ? '"'.$g.'"' : '').')'
676 672
 	);
677
-	$init[] = calculer_dec('select', 'array("' . join("\",\n\t\t\"", $boucle->select) . '")');
678
-	$init[] = calculer_dec('orderby', 'array(' . calculer_order($boucle) . ')');
673
+	$init[] = calculer_dec('select', 'array("'.join("\",\n\t\t\"", $boucle->select).'")');
674
+	$init[] = calculer_dec('orderby', 'array('.calculer_order($boucle).')');
679 675
 	$init[] = calculer_dec('where', calculer_dump_array($boucle->where));
680 676
 	$init[] = calculer_dec('join', calculer_dump_join($boucle->join));
681 677
 	$init[] = calculer_dec(
682 678
 		'limit',
683 679
 		(
684 680
 			!str_contains($boucle->limit, 'intval') ?
685
-			"'" . ($boucle->limit) . "'" :
686
-			$boucle->limit
681
+			"'".($boucle->limit)."'" : $boucle->limit
687 682
 		)
688 683
 	);
689 684
 	$init[] = calculer_dec('having', calculer_dump_array($boucle->having));
@@ -692,17 +687,17 @@  discard block
 block discarded – undo
692 687
 	// ou recalculée à chaque passage (vide)
693 688
 	foreach ($init as $i) {
694 689
 		if (reset($i)) {
695
-			$s .= "\n\t\t" . end($i);
690
+			$s .= "\n\t\t".end($i);
696 691
 		} # statique
697 692
 		else {
698
-			$d .= "\n\t" . end($i);
693
+			$d .= "\n\t".end($i);
699 694
 		} # dynamique
700 695
 	}
701 696
 
702 697
 	return ($boucle->hierarchie ? "\n\t$boucle->hierarchie" : '')
703 698
 	. $boucle->in
704 699
 	. $boucle->hash
705
-	. "\n\t" . 'if (!isset($command[\'table\'])) {'
700
+	. "\n\t".'if (!isset($command[\'table\'])) {'
706 701
 	. $s
707 702
 	. "\n\t}"
708 703
 	. $d;
@@ -757,7 +752,7 @@  discard block
 block discarded – undo
757 752
 	];
758 753
 
759 754
 	$p->id_boucle = $context_compil[2] ?? '';
760
-	$p->ligne = (int)($context_compil[3] ?? 0);
755
+	$p->ligne = (int) ($context_compil[3] ?? 0);
761 756
 	$p->lang = $context_compil[4] ?? '';
762 757
 
763 758
 	return $p;
@@ -786,7 +781,7 @@  discard block
 block discarded – undo
786 781
  *    - index 1 : Code de l'affectation
787 782
  **/
788 783
 function calculer_dec($nom, $val) {
789
-	$static = 'if (!isset($command[\'' . $nom . '\'])) ';
784
+	$static = 'if (!isset($command[\''.$nom.'\'])) ';
790 785
 	// si une variable apparait dans le calcul de la clause
791 786
 	// il faut la re-evaluer a chaque passage
792 787
 	if (
@@ -803,7 +798,7 @@  discard block
 block discarded – undo
803 798
 		$static = '';
804 799
 	}
805 800
 
806
-	return [$static, '$command[\'' . $nom . '\'] = ' . $val . ';'];
801
+	return [$static, '$command[\''.$nom.'\'] = '.$val.';'];
807 802
 }
808 803
 
809 804
 /**
@@ -828,27 +823,27 @@  discard block
 block discarded – undo
828 823
 	}
829 824
 	$res = '';
830 825
 	if ($a && $a[0] == "'?'") {
831
-		return ('(' . calculer_dump_array($a[1]) .
832
-			' ? ' . calculer_dump_array($a[2]) .
833
-			' : ' . calculer_dump_array($a[3]) .
826
+		return ('('.calculer_dump_array($a[1]).
827
+			' ? '.calculer_dump_array($a[2]).
828
+			' : '.calculer_dump_array($a[3]).
834 829
 			')');
835 830
 	} else {
836 831
 		foreach ($a as $k => $v) {
837
-			$showk = (is_numeric($k) ? '' : sql_quote($k) . ' => ');
838
-			$res .= ', ' . $showk . calculer_dump_array($v);
832
+			$showk = (is_numeric($k) ? '' : sql_quote($k).' => ');
833
+			$res .= ', '.$showk.calculer_dump_array($v);
839 834
 		}
840 835
 
841
-		return "\n\t\t\tarray(" . substr($res, 2) . ')';
836
+		return "\n\t\t\tarray(".substr($res, 2).')';
842 837
 	}
843 838
 }
844 839
 
845 840
 function calculer_dump_join($a) {
846 841
 	$res = '';
847 842
 	foreach ($a as $k => $v) {
848
-		$res .= ", '$k' => array(" . implode(',', $v) . ')';
843
+		$res .= ", '$k' => array(".implode(',', $v).')';
849 844
 	}
850 845
 
851
-	return 'array(' . substr($res, 2) . ')';
846
+	return 'array('.substr($res, 2).')';
852 847
 }
853 848
 
854 849
 /**
@@ -865,7 +860,7 @@  discard block
 block discarded – undo
865 860
 		$res .= ",'$k' => '$v'";
866 861
 	}
867 862
 
868
-	return 'array(' . substr($res, 1) . ')';
863
+	return 'array('.substr($res, 1).')';
869 864
 }
870 865
 
871 866
 /**
@@ -883,7 +878,7 @@  discard block
 block discarded – undo
883 878
 		$res .= ",'$k' => '$v'";
884 879
 	}
885 880
 
886
-	return 'array(' . substr($res, 1) . ')';
881
+	return 'array('.substr($res, 1).')';
887 882
 }
888 883
 
889 884
 function calculer_order(&$boucle) {
@@ -952,19 +947,19 @@  discard block
 block discarded – undo
952 947
 				) {
953 948
 					$res .= " .\n$tab$code";
954 949
 				} else {
955
-					$res = substr($res, 0, -1) . substr($code, 1);
950
+					$res = substr($res, 0, -1).substr($code, 1);
956 951
 				}
957 952
 			}
958 953
 
959
-			return '(' . substr($res, 2 + $descr['niv']) . ')';
954
+			return '('.substr($res, 2 + $descr['niv']).')';
960 955
 		}
961 956
 	} else {
962
-		$nom = $descr['nom'] . $id_boucle . ($descr['niv'] ?: '');
957
+		$nom = $descr['nom'].$id_boucle.($descr['niv'] ?: '');
963 958
 
964
-		return "join('', array_map('array_shift', \$GLOBALS['debug_objets']['sequence']['$nom'] = array(" . join(
959
+		return "join('', array_map('array_shift', \$GLOBALS['debug_objets']['sequence']['$nom'] = array(".join(
965 960
 			" ,\n$tab",
966 961
 			$codes
967
-		) . ')))';
962
+		).')))';
968 963
 	}
969 964
 }
970 965
 
@@ -1000,7 +995,7 @@  discard block
 block discarded – undo
1000 995
 			// texte seul
1001 996
 			case 'texte':
1002 997
 				$code = sandbox_composer_texte($p->texte, $p);
1003
-				$commentaire = strlen($p->texte) . ' signes';
998
+				$commentaire = strlen($p->texte).' signes';
1004 999
 				$avant = '';
1005 1000
 				$apres = '';
1006 1001
 				$altern = "''";
@@ -1009,14 +1004,14 @@  discard block
 block discarded – undo
1009 1004
 			case 'polyglotte':
1010 1005
 				$code = '';
1011 1006
 				foreach ($p->traductions as $k => $v) {
1012
-					$code .= ",'" .
1013
-						str_replace(['\\', "'"], ['\\\\', "\\'"], $k) .
1014
-						"' => '" .
1015
-						str_replace(['\\', "'"], ['\\\\', "\\'"], $v) .
1007
+					$code .= ",'".
1008
+						str_replace(['\\', "'"], ['\\\\', "\\'"], $k).
1009
+						"' => '".
1010
+						str_replace(['\\', "'"], ['\\\\', "\\'"], $v).
1016 1011
 						"'";
1017 1012
 				}
1018
-				$code = 'choisir_traduction(array(' .
1019
-					substr($code, 1) .
1013
+				$code = 'choisir_traduction(array('.
1014
+					substr($code, 1).
1020 1015
 					'))';
1021 1016
 				$commentaire = '&';
1022 1017
 				$avant = '';
@@ -1032,7 +1027,7 @@  discard block
 block discarded – undo
1032 1027
 					$err_e_c = true;
1033 1028
 					$code = "''";
1034 1029
 				} else {
1035
-					$commentaire = '<INCLURE ' . addslashes(str_replace("\n", ' ', $code)) . '>';
1030
+					$commentaire = '<INCLURE '.addslashes(str_replace("\n", ' ', $code)).'>';
1036 1031
 					$avant = '';
1037 1032
 					$apres = '';
1038 1033
 					$altern = "''";
@@ -1061,8 +1056,8 @@  discard block
 block discarded – undo
1061 1056
 					$err_e_c = true;
1062 1057
 					$code = "''";
1063 1058
 				} else {
1064
-					$code = 'BOUCLE' .
1065
-						str_replace('-', '_', $nom) . $descr['nom'] .
1059
+					$code = 'BOUCLE'.
1060
+						str_replace('-', '_', $nom).$descr['nom'].
1066 1061
 						'($Cache, $Pile, $doublons, $Numrows, $SP)';
1067 1062
 					$commentaire = "?$nom";
1068 1063
 					if (
@@ -1104,24 +1099,22 @@  discard block
 block discarded – undo
1104 1099
 				foreach ($p->arg as $k => $v) {
1105 1100
 					$_v = calculer_liste($v, $descr, $boucles, $id_boucle);
1106 1101
 					if ($k) {
1107
-						$l[] = _q($k) . ' => ' . $_v;
1102
+						$l[] = _q($k).' => '.$_v;
1108 1103
 					} else {
1109 1104
 						$code = $_v;
1110 1105
 					}
1111 1106
 				}
1112 1107
 				// Si le module n'est pas fourni, l'expliciter sauf si calculé
1113 1108
 				if ($p->module) {
1114
-					$m = $p->module . ':' . $p->nom_champ;
1109
+					$m = $p->module.':'.$p->nom_champ;
1115 1110
 				} elseif ($p->nom_champ) {
1116
-					$m = MODULES_IDIOMES . ':' . $p->nom_champ;
1111
+					$m = MODULES_IDIOMES.':'.$p->nom_champ;
1117 1112
 				} else {
1118 1113
 					$m = '';
1119 1114
 				}
1120 1115
 
1121
-				$code = (!$code ? "'$m'" :
1122
-						($m ? "'$m' . $code" :
1123
-							("(strpos(\$x=$code, ':') ? \$x : ('" . MODULES_IDIOMES . ":' . \$x))")))
1124
-					. (!$l ? '' : (', array(' . implode(",\n", $l) . ')'));
1116
+				$code = (!$code ? "'$m'" : ($m ? "'$m' . $code" : ("(strpos(\$x=$code, ':') ? \$x : ('".MODULES_IDIOMES.":' . \$x))")))
1117
+					. (!$l ? '' : (', array('.implode(",\n", $l).')'));
1125 1118
 				$code = "_T($code)";
1126 1119
 				if ($p->param) {
1127 1120
 					$p->id_boucle = $id_boucle;
@@ -1143,7 +1136,7 @@  discard block
 block discarded – undo
1143 1136
 				$p->type_requete = $type;
1144 1137
 
1145 1138
 				$code = calculer_champ($p);
1146
-				$commentaire = '#' . $p->nom_champ . $p->etoile;
1139
+				$commentaire = '#'.$p->nom_champ.$p->etoile;
1147 1140
 				$avant = calculer_liste(
1148 1141
 					$p->avant,
1149 1142
 					$descr,
@@ -1182,10 +1175,9 @@  discard block
 block discarded – undo
1182 1175
 		if ($code != "''") {
1183 1176
 			$code = compile_retour($code, $avant, $apres, $altern, $tab, $descr['niv']);
1184 1177
 			$codes[] = (($mode == 'validation') ?
1185
-				"array($code, '$commentaire', " . $p->ligne . ')'
1178
+				"array($code, '$commentaire', ".$p->ligne.')'
1186 1179
 				: (($mode == 'code') ?
1187
-					"\n// $commentaire\n$code" :
1188
-					$code));
1180
+					"\n// $commentaire\n$code" : $code));
1189 1181
 		}
1190 1182
 	} // foreach
1191 1183
 
@@ -1241,19 +1233,19 @@  discard block
 block discarded – undo
1241 1233
 			$cond = '';
1242 1234
 		} elseif (preg_match(_REGEXP_COND_VIDE_NONVIDE, $code, $r)) {
1243 1235
 			$t = $r[2];
1244
-			$cond = '!' . $r[1];
1236
+			$cond = '!'.$r[1];
1245 1237
 		} else {
1246 1238
 			if (preg_match(_REGEXP_COND_NONVIDE_VIDE, $code, $r)) {
1247 1239
 				$t = $r[2];
1248 1240
 				$cond = $r[1];
1249 1241
 			} else {
1250
-				$t = '$t' . $n;
1242
+				$t = '$t'.$n;
1251 1243
 				$cond = "($t = $code)!==''";
1252 1244
 			}
1253 1245
 		}
1254 1246
 
1255
-		$res = (!$avant ? '' : "$avant . ") .
1256
-			$t .
1247
+		$res = (!$avant ? '' : "$avant . ").
1248
+			$t.
1257 1249
 			(!$apres ? '' : " . $apres");
1258 1250
 
1259 1251
 		if ($res !== $t) {
@@ -1304,12 +1296,12 @@  discard block
 block discarded – undo
1304 1296
 
1305 1297
 	// rendre inertes les echappements de #[](){}<>
1306 1298
 	$i = 0;
1307
-	while (str_contains($squelette, $inerte = '-INERTE' . $i)) {
1299
+	while (str_contains($squelette, $inerte = '-INERTE'.$i)) {
1308 1300
 		$i++;
1309 1301
 	}
1310 1302
 	$squelette = preg_replace_callback(
1311 1303
 		',\\\\([#[()\]{}<>]),',
1312
-		fn($a) => "$inerte-" . ord($a[1]) . '-',
1304
+		fn($a) => "$inerte-".ord($a[1]).'-',
1313 1305
 		$squelette,
1314 1306
 		-1,
1315 1307
 		$esc
@@ -1325,7 +1317,7 @@  discard block
 block discarded – undo
1325 1317
 	// Phraser le squelette, selon sa grammaire
1326 1318
 
1327 1319
 	$boucles = [];
1328
-	$f = charger_fonction('phraser_' . $gram, 'public');
1320
+	$f = charger_fonction('phraser_'.$gram, 'public');
1329 1321
 
1330 1322
 	$squelette = $f($squelette, '', $boucles, $descr);
1331 1323
 
@@ -1341,7 +1333,7 @@  discard block
 block discarded – undo
1341 1333
 			);
1342 1334
 			$boucles[$i]->descr['squelette'] = preg_replace_callback(
1343 1335
 				",$inerte-(\d+)-,",
1344
-				fn ($a) => '\\\\' . chr($a[1]),
1336
+				fn ($a) => '\\\\'.chr($a[1]),
1345 1337
 				$boucle->descr['squelette']
1346 1338
 			);
1347 1339
 		}
@@ -1352,19 +1344,19 @@  discard block
 block discarded – undo
1352 1344
 		include_spip('public/decompiler');
1353 1345
 		foreach ($boucles as $id => $boucle) {
1354 1346
 			if ($id) {
1355
-				$decomp = "\n/* BOUCLE " .
1356
-					$boucle->type_requete .
1357
-					' ' .
1358
-					str_replace('*/', '* /', public_decompiler($boucle, $gram, 0, 'criteres')) .
1359
-					($boucle->debug ? "\n *\n * " . implode("\n * ", $boucle->debug) . "\n" : '') .
1347
+				$decomp = "\n/* BOUCLE ".
1348
+					$boucle->type_requete.
1349
+					' '.
1350
+					str_replace('*/', '* /', public_decompiler($boucle, $gram, 0, 'criteres')).
1351
+					($boucle->debug ? "\n *\n * ".implode("\n * ", $boucle->debug)."\n" : '').
1360 1352
 					" */\n";
1361 1353
 			} else {
1362
-				$decomp = ("\n/*\n" .
1354
+				$decomp = ("\n/*\n".
1363 1355
 					str_replace('*/', '* /', public_decompiler($squelette, $gram))
1364 1356
 					. "\n*/");
1365 1357
 			}
1366
-			$boucles[$id]->return = $decomp . $boucle->return;
1367
-			$GLOBALS['debug_objets']['code'][$nom . $id] = $boucle->return;
1358
+			$boucles[$id]->return = $decomp.$boucle->return;
1359
+			$GLOBALS['debug_objets']['code'][$nom.$id] = $boucle->return;
1368 1360
 		}
1369 1361
 	}
1370 1362
 
@@ -1387,7 +1379,7 @@  discard block
 block discarded – undo
1387 1379
 		}
1388 1380
 	}
1389 1381
 	foreach ($boucles as $id => $boucle) {
1390
-		$GLOBALS['debug_objets']['boucle'][$nom . $id] = $boucle;
1382
+		$GLOBALS['debug_objets']['boucle'][$nom.$id] = $boucle;
1391 1383
 	}
1392 1384
 	$descr['documents'] = compile_inclure_doublons($squelette);
1393 1385
 
@@ -1480,8 +1472,7 @@  discard block
 block discarded – undo
1480 1472
 						} else {
1481 1473
 							$boucles[$id]->type_requete = false;
1482 1474
 							$boucle = $boucles[$id];
1483
-							$x = (!$boucle->sql_serveur ? '' :
1484
-									($boucle->sql_serveur . ':')) .
1475
+							$x = (!$boucle->sql_serveur ? '' : ($boucle->sql_serveur.':')).
1485 1476
 								$type;
1486 1477
 							$msg = [
1487 1478
 								'zbug_table_inconnue',
@@ -1572,11 +1563,11 @@  discard block
 block discarded – undo
1572 1563
 				// fonction de boucle avec serveur & table
1573 1564
 				(
1574 1565
 					!$serveur
1575
-					|| !function_exists($f = 'boucle_' . $serveur . '_' . $table) && !function_exists($f = $f . '_dist')
1566
+					|| !function_exists($f = 'boucle_'.$serveur.'_'.$table) && !function_exists($f = $f.'_dist')
1576 1567
 				)
1577 1568
 				// fonction de boucle avec table
1578
-				&& !function_exists($f = 'boucle_' . $table)
1579
-				&& !function_exists($f = $f . '_dist')
1569
+				&& !function_exists($f = 'boucle_'.$table)
1570
+				&& !function_exists($f = $f.'_dist')
1580 1571
 			) {
1581 1572
 				// fonction de boucle standard
1582 1573
 				if (!function_exists($f = 'boucle_DEFAUT')) {
@@ -1584,20 +1575,20 @@  discard block
 block discarded – undo
1584 1575
 				}
1585 1576
 			}
1586 1577
 
1587
-			$req = "\n\n\tstatic \$command = array();\n\t" .
1588
-				"static \$connect;\n\t" .
1589
-				"\$command['connect'] = \$connect = " .
1590
-				_q($boucle->sql_serveur) .
1591
-				';' .
1578
+			$req = "\n\n\tstatic \$command = array();\n\t".
1579
+				"static \$connect;\n\t".
1580
+				"\$command['connect'] = \$connect = ".
1581
+				_q($boucle->sql_serveur).
1582
+				';'.
1592 1583
 				$f($id, $boucles);
1593 1584
 		} else {
1594 1585
 			$req = ("\n\treturn '';");
1595 1586
 		}
1596 1587
 
1597 1588
 		$boucles[$id]->return =
1598
-			"\n\nfunction BOUCLE" . strtr($id, '-', '_') . $nom .
1599
-			'(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {' .
1600
-			$req .
1589
+			"\n\nfunction BOUCLE".strtr($id, '-', '_').$nom.
1590
+			'(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {'.
1591
+			$req.
1601 1592
 			"\n}\n";
1602 1593
 	}
1603 1594
 
@@ -1607,7 +1598,7 @@  discard block
 block discarded – undo
1607 1598
 		return false;
1608 1599
 	}
1609 1600
 
1610
-	$principal = "\nfunction " . $nom . '($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {
1601
+	$principal = "\nfunction ".$nom.'($Cache, $Pile, $doublons = array(), $Numrows = array(), $SP = 0) {
1611 1602
 '
1612 1603
 		// reporter de maniere securisee les doublons inclus
1613 1604
 		. '
@@ -1615,15 +1606,15 @@  discard block
 block discarded – undo
1615 1606
 		$doublons = nettoyer_env_doublons($Pile[0]["doublons"]);
1616 1607
 
1617 1608
 	$connect = ' .
1618
-		_q($connect) . ';
1609
+		_q($connect).';
1619 1610
 	$page = ' .
1620 1611
 		// ATTENTION, le calcul de l'expression $corps affectera $Cache
1621 1612
 		// c'est pourquoi on l'affecte a la variable auxiliaire $page.
1622 1613
 		// avant de referencer $Cache
1623
-		$corps . ';
1614
+		$corps.';
1624 1615
 
1625 1616
 	return analyse_resultat_skel(' . var_export($nom, true)
1626
-		. ', $Cache, $page, ' . var_export($sourcefile, true) . ');
1617
+		. ', $Cache, $page, '.var_export($sourcefile, true).');
1627 1618
 }';
1628 1619
 
1629 1620
 	$secondes = spip_timer('calcul_skel');
@@ -1637,10 +1628,10 @@  discard block
 block discarded – undo
1637 1628
 	$code->return = '
1638 1629
 //
1639 1630
 // Fonction principale du squelette ' .
1640
-		$sourcefile .
1641
-		($connect ? " pour $connect" : '') .
1642
-		(!CODE_COMMENTE ? '' : "\n// Temps de compilation total: $secondes") .
1643
-		"\n//\n" .
1631
+		$sourcefile.
1632
+		($connect ? " pour $connect" : '').
1633
+		(!CODE_COMMENTE ? '' : "\n// Temps de compilation total: $secondes").
1634
+		"\n//\n".
1644 1635
 		$principal;
1645 1636
 
1646 1637
 	$boucles[''] = $code;
@@ -1692,7 +1683,7 @@  discard block
 block discarded – undo
1692 1683
  **/
1693 1684
 function requeteur_data_dist(&$boucles, &$boucle, &$id) {
1694 1685
 	include_spip('iterateur/data');
1695
-	if ($h = charger_fonction($boucle->type_requete . '_to_array', 'inc', true)) {
1686
+	if ($h = charger_fonction($boucle->type_requete.'_to_array', 'inc', true)) {
1696 1687
 		$g = charger_fonction('data', 'iterateur');
1697 1688
 		$boucles[$id] = $g($boucle);
1698 1689
 		// from[0] stocke le type de data (rss, yql, ...)
Please login to merge, or discard this patch.
ecrire/public/composer.php 1 patch
Spacing   +44 added lines, -44 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') && _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') || !_VAR_NOCACHE) {
159 159
 		ecrire_fichier($phpfile, $code);
160 160
 	}
@@ -215,16 +215,16 @@  discard block
 block discarded – undo
215 215
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
216 216
 
217 217
 			if ($j == 'X-Spip-Filtre' && isset($headers[$j])) {
218
-				$headers[$j] .= '|' . $r[3];
218
+				$headers[$j] .= '|'.$r[3];
219 219
 			} else {
220
-				$headers[$j] = str_replace(['\\\\',"\\'",'\\"'], ['\\',"'",'"'], $r[3]);
220
+				$headers[$j] = str_replace(['\\\\', "\\'", '\\"'], ['\\', "'", '"'], $r[3]);
221 221
 			}
222 222
 		}
223 223
 	}
224 224
 	// S'agit-il d'un resultat constant ou contenant du code php
225 225
 	$process_ins = (
226
-		!str_contains($corps, '<' . '?')
227
-		|| str_contains($corps, '<' . '?xml') && !str_contains(str_replace('<' . '?xml', '', $corps), '<' . '?')
226
+		!str_contains($corps, '<'.'?')
227
+		|| str_contains($corps, '<'.'?xml') && !str_contains(str_replace('<'.'?xml', '', $corps), '<'.'?')
228 228
 	)
229 229
 		? 'html'
230 230
 		: 'php';
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
 
254 254
 		if ($process_ins == 'html') {
255 255
 			$skel['process_ins'] = (
256
-				!str_contains($corps, '<' . '?')
257
-				|| str_contains($corps, '<' . '?xml') && !str_contains(str_replace('<' . '?xml', '', $corps), '<' . '?')
256
+				!str_contains($corps, '<'.'?')
257
+				|| str_contains($corps, '<'.'?xml') && !str_contains(str_replace('<'.'?xml', '', $corps), '<'.'?')
258 258
 			)
259 259
 				? 'html'
260 260
 				: 'php';
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 //
273 273
 
274 274
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
275
-define('CODE_INCLURE_BALISE', '<' . '?php
275
+define('CODE_INCLURE_BALISE', '<'.'?php
276 276
 include_once("%s");
277 277
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
278 278
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 		// pas de lien symbolique sous Windows
304 304
 		&& !(stristr(PHP_OS, 'WIN') && str_contains($file, ':'))
305 305
 	) {
306
-		$file = './" . _DIR_RACINE . "' . $file;
306
+		$file = './" . _DIR_RACINE . "'.$file;
307 307
 	}
308 308
 
309 309
 	$lang = $context_compil[4];
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 	$args = array_map('argumenter_squelette', $args);
315 315
 	if (!empty($context_compil['appel_php_depuis_modele'])) {
316
-		$args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')';
316
+		$args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')';
317 317
 	}
318 318
 	$args = join(', ', $args);
319 319
 
@@ -347,14 +347,14 @@  discard block
 block discarded – undo
347 347
 	if (is_object($v)) {
348 348
 		return var_export($v, true);
349 349
 	} elseif (!is_array($v)) {
350
-		return "'" . texte_script((string) $v) . "'";
350
+		return "'".texte_script((string) $v)."'";
351 351
 	} else {
352 352
 		$out = [];
353 353
 		foreach ($v as $k => $val) {
354
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
354
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
355 355
 		}
356 356
 
357
-		return 'array(' . join(', ', $out) . ')';
357
+		return 'array('.join(', ', $out).')';
358 358
 	}
359 359
 }
360 360
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	}
380 380
 	else {
381 381
 		$str_args = base64_encode(serialize($args));
382
-		return '<?' . "php \$_zargs=unserialize(base64_decode('$str_args'));echo executer_balise_dynamique(...\$_zargs); ?" . ">\n";
382
+		return '<?'."php \$_zargs=unserialize(base64_decode('$str_args'));echo executer_balise_dynamique(...\$_zargs); ?".">\n";
383 383
 	}
384 384
 }
385 385
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 	}
458 458
 
459 459
 	// Y a-t-il une fonction de traitement des arguments ?
460
-	$f = 'balise_' . $nom_balise . '_stat';
460
+	$f = 'balise_'.$nom_balise.'_stat';
461 461
 
462 462
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
463 463
 
@@ -467,18 +467,18 @@  discard block
 block discarded – undo
467 467
 
468 468
 	// verifier que la fonction dyn est la,
469 469
 	// sinon se replier sur la generique si elle existe
470
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
470
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
471 471
 		if (
472 472
 			($balise_generique = chercher_balise_generique($nom))
473 473
 			&& ($nom_balise_generique = $balise_generique['nom_generique'])
474
-			&& ($file = include_spip('balise/' . strtolower($nom_balise_generique)))
475
-			&& function_exists('balise_' . $nom_balise_generique . '_dyn')
474
+			&& ($file = include_spip('balise/'.strtolower($nom_balise_generique)))
475
+			&& function_exists('balise_'.$nom_balise_generique.'_dyn')
476 476
 		) {
477 477
 			// et lui injecter en premier arg le nom de la balise
478 478
 			array_unshift($r, $nom);
479 479
 			$nom_balise = $nom_balise_generique;
480 480
 			if (!_DIR_RESTREINT) {
481
-				$file = _DIR_RESTREINT_ABS . $file;
481
+				$file = _DIR_RESTREINT_ABS.$file;
482 482
 			}
483 483
 		} else {
484 484
 			$msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]];
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 		$n = '';
581 581
 		foreach (explode(',', $liste) as $val) {
582 582
 			if (($a = intval($val)) && $val === strval($a)) {
583
-				$n .= ',' . $val;
583
+				$n .= ','.$val;
584 584
 			}
585 585
 		}
586 586
 		if (strlen($n)) {
@@ -759,8 +759,8 @@  discard block
 block discarded – undo
759 759
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
760 760
 			$i = 0;
761 761
 			do {
762
-				$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
763
-					[$sous[1] . ' AS id'],
762
+				$where[$k] = remplace_sous_requete($w, '('.calculer_select(
763
+					[$sous[1].' AS id'],
764 764
 					$from,
765 765
 					$from_type,
766 766
 					$wheresub,
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
 					$id,
774 774
 					$serveur,
775 775
 					false
776
-				) . ')');
776
+				).')');
777 777
 				if (!$i) {
778 778
 					$i = 1;
779 779
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 		if ($sous[0] == 'SUBSELECT') {
793 793
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
794 794
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
795
-			$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
795
+			$where[$k] = remplace_sous_requete($w, '('.calculer_select(
796 796
 				$sous[1], # select
797 797
 				$sous[2], #from
798 798
 				[], #from_type
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
 				$id,
808 808
 				$serveur,
809 809
 				false
810
-			) . ')');
810
+			).')');
811 811
 		}
812 812
 		array_pop($where_simples);
813 813
 	}
@@ -870,15 +870,15 @@  discard block
 block discarded – undo
870 870
 			// sans recours a preg_match
871 871
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
872 872
 			$afrom[$t][$cle] = [
873
-				"\n" .
874
-				($from_type[$cle] ?? 'INNER') . ' JOIN',
873
+				"\n".
874
+				($from_type[$cle] ?? 'INNER').' JOIN',
875 875
 				$from[$cle],
876 876
 				"AS $cle",
877 877
 				'ON (',
878 878
 				"$cle.$c",
879 879
 				'=',
880 880
 				"$t.$carr",
881
-				($and ? 'AND ' . $and : '') .
881
+				($and ? 'AND '.$and : '').
882 882
 				')'
883 883
 			];
884 884
 			if (isset($afrom[$cle])) {
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 		$t = key($from);
917 917
 		$c = current($from);
918 918
 		reset($from);
919
-		$e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/';
919
+		$e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/';
920 920
 		if (
921 921
 			!(
922 922
 				strpos($t, ' ')
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
 			unset($afrom[$t][$nt]);
937 937
 			$afrom[$nt] = $afrom[$t];
938 938
 			unset($afrom[$t]);
939
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
939
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
940 940
 			$t = $nfrom[4];
941 941
 			$alias = '';
942 942
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -947,14 +947,14 @@  discard block
 block discarded – undo
947 947
 			if ($newcle != $oldcle) {
948 948
 				// si l'ancienne cle etait deja dans le select avec un AS
949 949
 				// reprendre simplement ce AS
950
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
950
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
951 951
 				if (preg_match($as, implode(',', $select), $m)) {
952 952
 					$alias = '';
953 953
 				} else {
954
-					$alias = ', ' . $nfrom[4] . " AS $oldcle";
954
+					$alias = ', '.$nfrom[4]." AS $oldcle";
955 955
 				}
956 956
 			}
957
-			$select = remplacer_jointnul($t . $alias, $select, $e);
957
+			$select = remplacer_jointnul($t.$alias, $select, $e);
958 958
 			$join = remplacer_jointnul($t, $join, $e);
959 959
 			$where = remplacer_jointnul($t, $where, $e);
960 960
 			$having = remplacer_jointnul($t, $having, $e);
@@ -1004,9 +1004,9 @@  discard block
 block discarded – undo
1004 1004
 	} else {
1005 1005
 		$exp = '';
1006 1006
 		if (strtoupper($join) === 'AND') {
1007
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
1007
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
1008 1008
 		} else {
1009
-			return $exp . join($join, $v);
1009
+			return $exp.join($join, $v);
1010 1010
 		}
1011 1011
 	}
1012 1012
 }
@@ -1068,6 +1068,6 @@  discard block
 block discarded – undo
1068 1068
 	}
1069 1069
 
1070 1070
 	return $mime_type
1071
-	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_'
1072
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1071
+	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_'
1072
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1073 1073
 }
Please login to merge, or discard this patch.
ecrire/public/evaluer_page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	try {
52
-		$res = eval('?' . '>' . $page['texte']);
52
+		$res = eval('?'.'>'.$page['texte']);
53 53
 		$page['texte'] = ob_get_contents();
54 54
 	} catch (\Throwable $e) {
55 55
 		$code = $page['texte'];
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 		if (!function_exists('numerote_ligne_php')) {
58 58
 			function numerote_ligne_php($match) {
59 59
 				$GLOBALS['numero_ligne_php']++;
60
-				return "\n/*" . str_pad((string) $GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/';
60
+				return "\n/*".str_pad((string) $GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT).'*/';
61 61
 			}
62 62
 		}
63
-		$code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code);
63
+		$code = '/*001*/'.preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code);
64 64
 		$code = trim(highlight_string($code, true));
65
-		erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]);
65
+		erreur_squelette('L'.$e->getLine().': '.$e->getMessage().'<br />'.$code, [$page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang']]);
66 66
 		$page['texte'] = '<!-- Erreur -->';
67 67
 	}
68 68
 	ob_end_clean();
Please login to merge, or discard this patch.
ecrire/public/phraser_html.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -55,19 +55,19 @@  discard block
 block discarded – undo
55 55
  * Nom d'une balise #TOTO
56 56
  *
57 57
  * Écriture alambiquée pour rester compatible avec les hexadecimaux des vieux squelettes */
58
-define('NOM_DE_CHAMP', '#((' . NOM_DE_BOUCLE . "):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
58
+define('NOM_DE_CHAMP', '#(('.NOM_DE_BOUCLE."):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})");
59 59
 /** Balise complète [...(#TOTO) ... ] */
60
-define('CHAMP_ETENDU', '/\[([^\[]*?)\(' . NOM_DE_CHAMP . '([^)]*\)[^]]*)\]/S');
60
+define('CHAMP_ETENDU', '/\[([^\[]*?)\('.NOM_DE_CHAMP.'([^)]*\)[^]]*)\]/S');
61 61
 
62 62
 define('BALISE_INCLURE', '/<INCLU[DR]E[[:space:]]*(\(([^)]*)\))?/S');
63 63
 define('BALISE_POLYGLOTTE', ',<multi>(.*)</multi>,Uims');
64 64
 define('BALISE_IDIOMES', ',<:(([a-z0-9_]+):)?([a-z0-9_]*)({([^\|=>]*=[^\|>]*)})?((\|[^>]*)?:/?>),iS');
65
-define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*((' . NOM_DE_CHAMP . '[{][^}]*})?[^,]*)\s*,?\s*@s');
65
+define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*(('.NOM_DE_CHAMP.'[{][^}]*})?[^,]*)\s*,?\s*@s');
66 66
 
67 67
 /** Champ sql dans parenthèse ex: (id_article) */
68 68
 define('SQL_ARGS', '(\([^)]*\))');
69 69
 /** Fonction SQL sur un champ ex: SUM(visites) */
70
-define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)' . SQL_ARGS . '?`?');
70
+define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)'.SQL_ARGS.'?`?');
71 71
 
72 72
 /**
73 73
  * Parser les <INCLURE> dans le texte
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
 	while (
267 267
 		(($p = strpos($texte, '#')) !== false)
268
-		&& preg_match('/' . NOM_DE_CHAMP . '/S', $texte, $match, PREG_OFFSET_CAPTURE, $p)
268
+		&& preg_match('/'.NOM_DE_CHAMP.'/S', $texte, $match, PREG_OFFSET_CAPTURE, $p)
269 269
 	) {
270 270
 		$poss = array_column($match, 1);
271 271
 		$match = array_column($match, 0);
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 			$collecte[] = $champ;
420 420
 			$args = ltrim($regs[count($regs) - 1]);
421 421
 		} else {
422
-			if (!preg_match('/' . NOM_DE_CHAMP . '([{|])/', $arg, $r)) {
422
+			if (!preg_match('/'.NOM_DE_CHAMP.'([{|])/', $arg, $r)) {
423 423
 				// 0 est un aveu d'impuissance. A completer
424 424
 				$arg = phraser_champs_exterieurs($arg, 0, $sep, $result);
425 425
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
  */
506 506
 function phraser_champs_exterieurs(string $texte, int $ligne, string $sep, array $nested_res): array {
507 507
 	$res = [];
508
-	$preg = ',^%' . preg_quote($sep, ',') . '([0-9]+)(\n*)@,';
508
+	$preg = ',^%'.preg_quote($sep, ',').'([0-9]+)(\n*)@,';
509 509
 	while (($p = strpos($texte, "%$sep")) !== false) {
510 510
 		$suite = substr($texte, $p);
511 511
 		if (!preg_match($preg, $suite, $m)) {
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 			$pos_apres = 0;
581 581
 			$champs_trouves = phraser_args($match[7], ')', $sep, $champs_trouves, $champ, $pos_apres);
582 582
 			phraser_vieux($champ);
583
-			$champ->avant =	phraser_champs_exterieurs($match[1], $nbl, $sep, $champs_trouves);
583
+			$champ->avant = phraser_champs_exterieurs($match[1], $nbl, $sep, $champs_trouves);
584 584
 			$apres = substr($match[7], $pos_apres + 1);
585 585
 
586 586
 			$nbl_debut_champ = 0;
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 			$j = count($champs_trouves) - 1;
597 597
 			// on remplace ce champ par un placeholder
598 598
 			// ajouter $nbl_champ retour ligne pour que la partie conserve le nombre de lignes lors des itérations suivantes
599
-			$parties[] = ($t = "%{$sep}{$j}" . str_repeat("\n", $nbl_champ) . '@');
599
+			$parties[] = ($t = "%{$sep}{$j}".str_repeat("\n", $nbl_champ).'@');
600 600
 			$nbl += $nbl_champ;
601 601
 
602 602
 			$texte = substr($texte, $poss[0] + strlen($match[0]));
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 		// si on a trouvé des morceaux, il faut recommencer
607 607
 		if (count($parties)) {
608 608
 			// reprenons tous les morceaux qu'on a mis de côté car ne matchant pas (encore)
609
-			$texte = implode('', $parties) . $texte;
609
+			$texte = implode('', $parties).$texte;
610 610
 		}
611 611
 	} while (count($parties));
612 612
 
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 					// une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"}
693 693
 					if (preg_match(',^(["\'])(.*)\1$,', $m[4])) {
694 694
 						$c = null;
695
-						eval('$c = ' . $m[4] . ';');
695
+						eval('$c = '.$m[4].';');
696 696
 						if (isset($c)) {
697 697
 							$m[4] = $c;
698 698
 						}
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 					if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', (string) $param, $m)) {
773 773
 						$crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', '');
774 774
 					} elseif (
775
-						preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC .
775
+						preg_match(',^([!]?)('.CHAMP_SQL_PLUS_FONC.
776 776
 						')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', (string) $param, $m)
777 777
 					) {
778 778
 						$a2 = trim($m[8]);
@@ -789,8 +789,8 @@  discard block
 block discarded – undo
789 789
 						);
790 790
 						$crit->exclus = $m[1];
791 791
 					} elseif (
792
-						preg_match('/^([!]?)\s*(' .
793
-						CHAMP_SQL_PLUS_FONC .
792
+						preg_match('/^([!]?)\s*('.
793
+						CHAMP_SQL_PLUS_FONC.
794 794
 						')\s*(\??)(.*)$/is', (string) $param, $m)
795 795
 					) {
796 796
 						// contient aussi les comparaisons implicites !
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
 			}
929 929
 
930 930
 			// trouver sa position de depart reelle : au <Bxx> ou au <BBxx>
931
-			$precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>';
931
+			$precond_boucle = BALISE_PRECOND_BOUCLE.$id_boucle.'>';
932 932
 			$pos_precond = strpos((string) $texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
933 933
 			if (
934 934
 				$pos_precond !== false
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
 				$boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle);
940 940
 			}
941 941
 
942
-			$preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>';
942
+			$preaff_boucle = BALISE_PREAFF_BOUCLE.$id_boucle.'>';
943 943
 			$pos_preaff = strpos((string) $texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme);
944 944
 			if (
945 945
 				$pos_preaff !== false
@@ -988,13 +988,13 @@  discard block
 block discarded – undo
988 988
 	$pos_anonyme_next = null;
989 989
 	// si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme
990 990
 	if (!strlen((string) $id_boucle)) {
991
-		$pos_anonyme_next = strpos((string) $texte, BALISE_BOUCLE . '(', $pos_courante);
991
+		$pos_anonyme_next = strpos((string) $texte, BALISE_BOUCLE.'(', $pos_courante);
992 992
 	}
993 993
 
994 994
 	//
995 995
 	// 1. Recuperer la partie conditionnelle apres
996 996
 	//
997
-	$apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . '>';
997
+	$apres_boucle = BALISE_POSTCOND_BOUCLE.$id_boucle.'>';
998 998
 	$pos_apres = strpos((string) $texte, $apres_boucle, $pos_courante);
999 999
 	if (
1000 1000
 		$pos_apres !== false
@@ -1003,13 +1003,13 @@  discard block
 block discarded – undo
1003 1003
 		$boucle['pos_postcond'] = $pos_apres;
1004 1004
 		$pos_apres += strlen($apres_boucle);
1005 1005
 		$boucle['pos_postcond_inside'] = $pos_apres;
1006
-		$pos_courante = $pos_apres ;
1006
+		$pos_courante = $pos_apres;
1007 1007
 	}
1008 1008
 
1009 1009
 	//
1010 1010
 	// 2. Récuperer la partie alternative apres
1011 1011
 	//
1012
-	$altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . '>';
1012
+	$altern_boucle = BALISE_ALT_BOUCLE.$id_boucle.'>';
1013 1013
 	$pos_altern = strpos((string) $texte, $altern_boucle, $pos_courante);
1014 1014
 	if (
1015 1015
 		$pos_altern !== false
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
 	//
1025 1025
 	// 3. Recuperer la partie footer non alternative
1026 1026
 	//
1027
-	$postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . '>';
1027
+	$postaff_boucle = BALISE_POSTAFF_BOUCLE.$id_boucle.'>';
1028 1028
 	$pos_postaff = strpos((string) $texte, $postaff_boucle, $pos_courante);
1029 1029
 	if (
1030 1030
 		$pos_postaff !== false
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 		$boucle['pos_postaff'] = $pos_postaff;
1034 1034
 		$pos_postaff += strlen($postaff_boucle);
1035 1035
 		$boucle['pos_postaff_inside'] = $pos_postaff;
1036
-		$pos_courante = $pos_postaff ;
1036
+		$pos_courante = $pos_postaff;
1037 1037
 	}
1038 1038
 
1039 1039
 	return $boucle;
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
  * @return string
1070 1070
  */
1071 1071
 function public_generer_boucle_placeholder(string $id_boucle, &$boucle, string $boucle_placeholder, int $nb_lignes): string {
1072
-	$placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad('', $nb_lignes, "\n") . ']';
1072
+	$placeholder = "[(#{$boucle_placeholder}{".$id_boucle.'})'.str_pad('', $nb_lignes, "\n").']';
1073 1073
 	//memoriser la boucle a reinjecter
1074 1074
 	$id_boucle = "$id_boucle";
1075 1075
 	phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle);
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
 	// definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette
1091 1091
 	if (is_null($boucle_placeholder)) {
1092 1092
 		do {
1093
-			$boucle_placeholder = 'BOUCLE_PLACEHOLDER_' . strtoupper(md5(uniqid()));
1093
+			$boucle_placeholder = 'BOUCLE_PLACEHOLDER_'.strtoupper(md5(uniqid()));
1094 1094
 		} while (str_contains((string) $texte, $boucle_placeholder));
1095 1095
 	}
1096 1096
 
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 
1111 1111
 		// boucle anonyme ?
1112 1112
 		if (!strlen((string) $id_boucle)) {
1113
-			$id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' . $id_parent . ':' . json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8);
1113
+			$id_boucle = '_anon_L'.$ligne_milieu.'_'.substr(md5('anonyme:'.$id_parent.':'.json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8);
1114 1114
 		}
1115 1115
 
1116 1116
 		$pos_debut_boucle = $pos_courante;
@@ -1123,7 +1123,7 @@  discard block
 block discarded – undo
1123 1123
 
1124 1124
 			$pos_avant = $boucle['pos_precond_inside'];
1125 1125
 			$result->avant = substr((string) $texte, $pos_avant, $pos_courante - $pos_avant);
1126
-			$ligne_avant = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1126
+			$ligne_avant = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_avant);
1127 1127
 		}
1128 1128
 
1129 1129
 		// Regarder si on a une partie inconditionnelle avant <BB_xxx>
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 
1133 1133
 			$pos_preaff = $boucle['pos_preaff_inside'];
1134 1134
 			$result->preaff = substr((string) $texte, $pos_preaff, $end_preaff - $pos_preaff);
1135
-			$ligne_preaff = $ligne_debut_texte +  public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1135
+			$ligne_preaff = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_preaff);
1136 1136
 		}
1137 1137
 
1138 1138
 		$result->id_boucle = $id_boucle;
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
 		} else {
1191 1191
 			$pos_milieu += 1;
1192 1192
 
1193
-			$fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . '>';
1193
+			$fin_boucle = BALISE_FIN_BOUCLE.$id_boucle_search.'>';
1194 1194
 			$pos_fin = strpos((string) $texte, $fin_boucle, $pos_milieu);
1195 1195
 			if ($pos_fin === false) {
1196 1196
 				$err_b = [
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 			else {
1204 1204
 				// verifier une eventuelle imbrication d'une boucle homonyme
1205 1205
 				// (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur)
1206
-				$search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '(';
1206
+				$search_debut_boucle = BALISE_BOUCLE.$id_boucle_search.'(';
1207 1207
 				$search_from = $pos_milieu;
1208 1208
 				$nb_open = 1;
1209 1209
 				$nb_close = 1;
@@ -1243,7 +1243,7 @@  discard block
 block discarded – undo
1243 1243
 		if ($boucle['pos_postcond']) {
1244 1244
 			$result->apres = substr((string) $texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante);
1245 1245
 			$ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']);
1246
-			$pos_courante = $boucle['pos_postcond_inside'] ;
1246
+			$pos_courante = $boucle['pos_postcond_inside'];
1247 1247
 		}
1248 1248
 
1249 1249
 
Please login to merge, or discard this patch.
ecrire/inc/filtres.php 1 patch
Spacing   +118 added lines, -119 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	}
101 101
 
102 102
 	include_fichiers_fonctions();
103
-	foreach (['filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc] as $f) {
103
+	foreach (['filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc] as $f) {
104 104
 		trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels
105 105
 		if (is_callable($f)) {
106 106
 			return $f;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	// affichage "GIT [master: abcdef]"
236 236
 	$commit = $desc['commit_short'] ?? $desc['commit'];
237 237
 	if ($desc['branch']) {
238
-		$commit = $desc['branch'] . ': ' . $commit;
238
+		$commit = $desc['branch'].': '.$commit;
239 239
 	}
240 240
 	return "{$desc['vcs']} [$commit]";
241 241
 }
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 	}
257 257
 
258 258
 	// version installee par GIT
259
-	if (lire_fichier($dir . '/.git/HEAD', $c)) {
259
+	if (lire_fichier($dir.'/.git/HEAD', $c)) {
260 260
 		$currentHead = trim(substr((string) $c, 4));
261
-		if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) {
261
+		if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) {
262 262
 			return [
263 263
 				'vcs' => 'GIT',
264 264
 				'branch' => basename($currentHead),
@@ -273,12 +273,12 @@  discard block
 block discarded – undo
273 273
 
274 274
 // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images
275 275
 // et laisser passer les fonctions personnelles baptisees image_...
276
-$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php';
277
-$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
278
-$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php';
279
-$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
280
-$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php';
281
-$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true;//'inc/filtres_images_mini.php';
276
+$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php';
277
+$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php';
278
+$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php';
279
+$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php';
280
+$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php';
281
+$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true; //'inc/filtres_images_mini.php';
282 282
 
283 283
 $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php';
284 284
 $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php';
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
  */
438 438
 function filtre_debug(mixed $val, $key = null) {
439 439
 	$debug = (
440
-		is_null($key) ? '' : (var_export($key, true) . ' = ')
441
-		) . var_export($val, true);
440
+		is_null($key) ? '' : (var_export($key, true).' = ')
441
+		).var_export($val, true);
442 442
 
443 443
 	include_spip('inc/autoriser');
444 444
 	if (autoriser('webmestre')) {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 		$is_file = false;
495 495
 	}
496 496
 	if ($is_file) {
497
-		$is_local_file = function ($path) {
497
+		$is_local_file = function($path) {
498 498
 			if (str_contains($path, '?')) {
499 499
 				$path = supprimer_timestamp($path);
500 500
 				// remove ?24px added by find_in_theme on .svg files
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 					&& preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)
543 543
 				) {
544 544
 					$srcover = $match[1];
545
-					$srcover_filter = $filtre("<img src='" . $match[1] . "' />", ...$args);
545
+					$srcover_filter = $filtre("<img src='".$match[1]."' />", ...$args);
546 546
 					$srcover_filter = extraire_attribut($srcover_filter, 'src');
547 547
 					$reduit = str_replace($srcover, $srcover_filter, (string) $reduit);
548 548
 				}
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 	// " -> &quot; et tout ce genre de choses
944 944
 	$u = $GLOBALS['meta']['pcre_u'];
945 945
 	$texte = str_replace('&nbsp;', ' ', $texte);
946
-	$texte = preg_replace('/\s{2,}/S' . $u, ' ', $texte);
946
+	$texte = preg_replace('/\s{2,}/S'.$u, ' ', $texte);
947 947
 	// ne pas echapper les sinqle quotes car certains outils de syndication gerent mal
948 948
 	$texte = entites_html($texte, false, false);
949 949
 	// mais bien echapper les double quotes !
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
 		return '';
1006 1006
 	}
1007 1007
 	return preg_replace(
1008
-		',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S',
1008
+		',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S',
1009 1009
 		'',
1010 1010
 		$texte
1011 1011
 	);
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 		return '';
1036 1036
 	}
1037 1037
 	if (preg_match(
1038
-			',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S',
1038
+			',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S',
1039 1039
 			$texte,
1040 1040
 			$regs
1041 1041
 		)
@@ -1127,7 +1127,7 @@  discard block
 block discarded – undo
1127 1127
 		return '';
1128 1128
 	}
1129 1129
 	$u = $GLOBALS['meta']['pcre_u'];
1130
-	$texte = preg_replace('/\s+/S' . $u, ' ', $texte);
1130
+	$texte = preg_replace('/\s+/S'.$u, ' ', $texte);
1131 1131
 	$texte = preg_replace('/<(p|br)( [^>]*)?>/iS', "\n\n", $texte);
1132 1132
 	$texte = preg_replace("/^\n+/", '', $texte);
1133 1133
 	$texte = preg_replace("/\n+$/", '', $texte);
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 		)
1166 1166
 	) {
1167 1167
 		foreach ($liens[0] as $a) {
1168
-			$rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel');
1168
+			$rel = 'noopener noreferrer '.extraire_attribut($a, 'rel');
1169 1169
 			$ablank = inserer_attribut($a, 'rel', $rel);
1170 1170
 			$ablank = inserer_attribut($ablank, 'target', '_blank');
1171 1171
 			$texte = str_replace($a, $ablank, $texte);
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
 		foreach ($regs[0] as $a) {
1194 1194
 			$rel = extraire_attribut($a, 'rel') ?? '';
1195 1195
 			if (!str_contains($rel, 'nofollow')) {
1196
-				$rel = 'nofollow' . ($rel ? " $rel" : '');
1196
+				$rel = 'nofollow'.($rel ? " $rel" : '');
1197 1197
 				$anofollow = inserer_attribut($a, 'rel', $rel);
1198 1198
 				$texte = str_replace($a, $anofollow, $texte);
1199 1199
 			}
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
 	$texte = preg_replace('@</p>@iS', "\n", $texte);
1227 1227
 	$texte = preg_replace("@<p\b.*>@UiS", '<br />', $texte);
1228 1228
 
1229
-	return preg_replace('@^\s*<br />@S' . $u, '', $texte);
1229
+	return preg_replace('@^\s*<br />@S'.$u, '', $texte);
1230 1230
 }
1231 1231
 
1232 1232
 /**
@@ -1314,7 +1314,7 @@  discard block
 block discarded – undo
1314 1314
 
1315 1315
 		// Calcul de la taille et choix de l'unité
1316 1316
 		$affichage = _T(
1317
-			'spip:taille_' . $unites[$puissance] . $suffixe_item,
1317
+			'spip:taille_'.$unites[$puissance].$suffixe_item,
1318 1318
 			[
1319 1319
 				'taille' => round($octets / $kilo ** $puissance, $precisions[$puissance])
1320 1320
 			]
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 	}
1349 1349
 	$u = $GLOBALS['meta']['pcre_u'];
1350 1350
 	if ($textebrut) {
1351
-		$texte = preg_replace([",\n,", ',\s(?=\s),msS' . $u], [' ', ''], textebrut($texte));
1351
+		$texte = preg_replace([",\n,", ',\s(?=\s),msS'.$u], [' ', ''], textebrut($texte));
1352 1352
 	}
1353 1353
 	$texte = texte_backend($texte);
1354 1354
 	$texte = str_replace(["'", '"'], ['&#039;', '&#034;'], $texte);
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
 	# un message pour abs_url
1384 1384
 	$GLOBALS['mode_abs_url'] = 'url';
1385 1385
 	$url = trim($url);
1386
-	$r = ',^(?:' . _PROTOCOLES_STD . '):?/?/?$,iS';
1386
+	$r = ',^(?:'._PROTOCOLES_STD.'):?/?/?$,iS';
1387 1387
 
1388 1388
 	return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url);
1389 1389
 }
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
 
1590 1590
 	$debut = '';
1591 1591
 	$suite = $texte;
1592
-	while ($t = strpos((string) ('-' . $suite), "\n", 1)) {
1592
+	while ($t = strpos((string) ('-'.$suite), "\n", 1)) {
1593 1593
 		$debut .= substr($suite, 0, $t - 1);
1594 1594
 		$suite = substr($suite, $t);
1595 1595
 		$car = substr($suite, 0, 1);
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
 			$suite = substr($suite, strlen($regs[0]));
1608 1608
 		}
1609 1609
 	}
1610
-	$texte = $debut . $suite;
1610
+	$texte = $debut.$suite;
1611 1611
 
1612 1612
 	if ($collecteurModeles) {
1613 1613
 		$texte = $collecteurModeles->retablir($texte);
@@ -1615,7 +1615,7 @@  discard block
 block discarded – undo
1615 1615
 
1616 1616
 	$texte = CollecteurHtmlTag::retablir_depuisHtmlBase64($texte);
1617 1617
 
1618
-	return $texte . $fin;
1618
+	return $texte.$fin;
1619 1619
 }
1620 1620
 
1621 1621
 
@@ -1654,7 +1654,7 @@  discard block
 block discarded – undo
1654 1654
 		}
1655 1655
 		// Compatibilité avec le prototype de fonction précédente qui utilisait un boolean
1656 1656
 		if (is_bool($options)) {
1657
-			trigger_deprecation('spip', '5.0', 'Using boolean $options parameter in "%s()" function is deprecated. Use %s array parameter instead.', __FUNCTION__, '[\'echappe_span\' => ' . var_export($options, true) . ']');
1657
+			trigger_deprecation('spip', '5.0', 'Using boolean $options parameter in "%s()" function is deprecated. Use %s array parameter instead.', __FUNCTION__, '[\'echappe_span\' => '.var_export($options, true).']');
1658 1658
 			$options = ['echappe_span' => $options];
1659 1659
 		}
1660 1660
 		if (!isset($options['echappe_span'])) {
@@ -1711,7 +1711,7 @@  discard block
 block discarded – undo
1711 1711
 
1712 1712
 		// Compatibilité avec le prototype de fonction précédente qui utilisait un boolean
1713 1713
 		if (is_bool($options)) {
1714
-			trigger_deprecation('spip', '5.0', 'Using boolean $options parameter in "%s()" function is deprecated. Use %s array parameter instead.', __FUNCTION__, '[\'echappe_span\' => ' . var_export($options, true) . ']');
1714
+			trigger_deprecation('spip', '5.0', 'Using boolean $options parameter in "%s()" function is deprecated. Use %s array parameter instead.', __FUNCTION__, '[\'echappe_span\' => '.var_export($options, true).']');
1715 1715
 			$options = ['echappe_span' => $options, 'lang_defaut' => _LANGUE_PAR_DEFAUT];
1716 1716
 		}
1717 1717
 		if (!isset($options['echappe_span'])) {
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
 	if (is_array($balise)) {
1881 1881
 		array_walk(
1882 1882
 			$balise,
1883
-			function (&$a, $key, $t) {
1883
+			function(&$a, $key, $t) {
1884 1884
 				$a = extraire_attribut($a, $t);
1885 1885
 			},
1886 1886
 			$attribut
@@ -1974,14 +1974,14 @@  discard block
 block discarded – undo
1974 1974
 
1975 1975
 	if ($old !== null) {
1976 1976
 		// Remplacer l'ancien attribut du meme nom
1977
-		$balise = $r[1] . $insert . $r[5];
1977
+		$balise = $r[1].$insert.$r[5];
1978 1978
 	} else {
1979 1979
 		// preferer une balise " />" (comme <img />)
1980 1980
 		if (preg_match(',/>,', $balise)) {
1981
-			$balise = preg_replace(',\s?/>,S', $insert . ' />', $balise, 1);
1981
+			$balise = preg_replace(',\s?/>,S', $insert.' />', $balise, 1);
1982 1982
 		} // sinon une balise <a ...> ... </a>
1983 1983
 		else {
1984
-			$balise = preg_replace(',\s?>,S', $insert . '>', $balise, 1);
1984
+			$balise = preg_replace(',\s?>,S', $insert.'>', $balise, 1);
1985 1985
 		}
1986 1986
 	}
1987 1987
 
@@ -2039,7 +2039,7 @@  discard block
 block discarded – undo
2039 2039
 			in_array($operation, ['ajouter', 'commuter'])
2040 2040
 			&& !$is_class_presente
2041 2041
 		) {
2042
-			$class_new = ltrim(rtrim($class_new ?? '') . ' ' . $c);
2042
+			$class_new = ltrim(rtrim($class_new ?? '').' '.$c);
2043 2043
 		} elseif (
2044 2044
 			in_array($operation, ['supprimer', 'commuter'])
2045 2045
 			&& $is_class_presente
@@ -2109,7 +2109,7 @@  discard block
 block discarded – undo
2109 2109
 // Quelques fonctions de calcul arithmetique
2110 2110
 //
2111 2111
 function floatstr($a) {
2112
-	return str_replace(',', '.', (string)(float) $a);
2112
+	return str_replace(',', '.', (string) (float) $a);
2113 2113
 }
2114 2114
 function strize($f, $a, $b) {
2115 2115
 	return floatstr($f(floatstr($a), floatstr($b)));
@@ -2250,13 +2250,13 @@  discard block
 block discarded – undo
2250 2250
 	if (!defined('_TAGS_NOM_AUTEUR')) {
2251 2251
 		define('_TAGS_NOM_AUTEUR', '');
2252 2252
 	}
2253
-	$tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR));
2253
+	$tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR));
2254 2254
 	foreach ($tags_acceptes as $tag) {
2255 2255
 		if (strlen($tag)) {
2256
-			$remp1[] = '<' . trim($tag) . '>';
2257
-			$remp1[] = '</' . trim($tag) . '>';
2258
-			$remp2[] = '\x60' . trim($tag) . '\x61';
2259
-			$remp2[] = '\x60/' . trim($tag) . '\x61';
2256
+			$remp1[] = '<'.trim($tag).'>';
2257
+			$remp1[] = '</'.trim($tag).'>';
2258
+			$remp2[] = '\x60'.trim($tag).'\x61';
2259
+			$remp2[] = '\x60/'.trim($tag).'\x61';
2260 2260
 		}
2261 2261
 	}
2262 2262
 	$v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom)));
@@ -2375,10 +2375,10 @@  discard block
 block discarded – undo
2375 2375
 	$fichier = basename($url);
2376 2376
 
2377 2377
 	return '<a rel="enclosure"'
2378
-	. ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '')
2379
-	. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2380
-	. ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '')
2381
-	. '>' . $fichier . '</a>';
2378
+	. ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '')
2379
+	. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2380
+	. ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '')
2381
+	. '>'.$fichier.'</a>';
2382 2382
 }
2383 2383
 
2384 2384
 /**
@@ -2406,9 +2406,9 @@  discard block
 block discarded – undo
2406 2406
 			} # vieux data
2407 2407
 			$fichier = basename($url);
2408 2408
 			$enclosures[] = '<enclosure'
2409
-				. ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '')
2410
-				. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2411
-				. ($length ? ' length="' . $length . '"' : '')
2409
+				. ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '')
2410
+				. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2411
+				. ($length ? ' length="'.$length.'"' : '')
2412 2412
 				. ' />';
2413 2413
 		}
2414 2414
 	}
@@ -2434,7 +2434,7 @@  discard block
 block discarded – undo
2434 2434
 		if (extraire_attribut($e, 'rel') == 'tag') {
2435 2435
 			$subjects .= '<dc:subject>'
2436 2436
 				. texte_backend(textebrut($e))
2437
-				. '</dc:subject>' . "\n";
2437
+				. '</dc:subject>'."\n";
2438 2438
 		}
2439 2439
 	}
2440 2440
 
@@ -2503,7 +2503,7 @@  discard block
 block discarded – undo
2503 2503
 	if (is_array($texte)) {
2504 2504
 		array_walk(
2505 2505
 			$texte,
2506
-			function (&$a, $key, $t) {
2506
+			function(&$a, $key, $t) {
2507 2507
 				$a = extraire_balises($a, $t);
2508 2508
 			},
2509 2509
 			$tag
@@ -2631,7 +2631,7 @@  discard block
 block discarded – undo
2631 2631
 		if ($fond != '404') {
2632 2632
 			$contexte = array_shift($p);
2633 2633
 			$contexte['page'] = $fond;
2634
-			$action = preg_replace('/([?]' . preg_quote((string) $fond, '/') . '[^&=]*[0-9]+)(&|$)/', '?&', $action);
2634
+			$action = preg_replace('/([?]'.preg_quote((string) $fond, '/').'[^&=]*[0-9]+)(&|$)/', '?&', $action);
2635 2635
 		}
2636 2636
 	}
2637 2637
 	// defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url
@@ -2686,9 +2686,9 @@  discard block
 block discarded – undo
2686 2686
 			. '"'
2687 2687
 			. (is_null($val)
2688 2688
 				? ''
2689
-				: ' value="' . entites_html($val) . '"'
2689
+				: ' value="'.entites_html($val).'"'
2690 2690
 			)
2691
-			. ' type="hidden"' . "\n/>";
2691
+			. ' type="hidden"'."\n/>";
2692 2692
 	}
2693 2693
 
2694 2694
 	return implode('', $hidden);
@@ -2798,7 +2798,7 @@  discard block
 block discarded – undo
2798 2798
 
2799 2799
 	return preg_replace_callback(
2800 2800
 		",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims",
2801
-		fn($x) => "url('" . suivre_lien($path, $x[1]) . "')",
2801
+		fn($x) => "url('".suivre_lien($path, $x[1])."')",
2802 2802
 		$contenu
2803 2803
 	);
2804 2804
 }
@@ -2862,14 +2862,14 @@  discard block
 block discarded – undo
2862 2862
 	) {
2863 2863
 		$distant = true;
2864 2864
 		$cssf = parse_url($css);
2865
-		$cssf = $cssf['path'] . ($cssf['query'] ? '?' . $cssf['query'] : '');
2865
+		$cssf = $cssf['path'].($cssf['query'] ? '?'.$cssf['query'] : '');
2866 2866
 		$cssf = preg_replace(',[?:&=],', '_', $cssf);
2867 2867
 	} else {
2868 2868
 		$distant = false;
2869 2869
 		$cssf = $css;
2870 2870
 		// 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi
2871 2871
 		//propose (rien a faire dans ce cas)
2872
-		$f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css);
2872
+		$f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css);
2873 2873
 		if (@file_exists($f)) {
2874 2874
 			return $f;
2875 2875
 		}
@@ -2879,7 +2879,7 @@  discard block
 block discarded – undo
2879 2879
 	$dir_var = sous_repertoire(_DIR_VAR, 'cache-css');
2880 2880
 	$f = $dir_var
2881 2881
 		. preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf)
2882
-		. '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css';
2882
+		. '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css';
2883 2883
 
2884 2884
 	// la css peut etre distante (url absolue !)
2885 2885
 	$contenu = null;
@@ -2926,8 +2926,8 @@  discard block
 block discarded – undo
2926 2926
 		} // si la css_direction commence par $dir_var on la fait passer pour une absolue
2927 2927
 		elseif (str_starts_with($css_direction, $dir_var)) {
2928 2928
 			$css_direction = substr($css_direction, strlen($dir_var));
2929
-			$src_faux_abs['/@@@@@@/' . $css_direction] = $css_direction;
2930
-			$css_direction = '/@@@@@@/' . $css_direction;
2929
+			$src_faux_abs['/@@@@@@/'.$css_direction] = $css_direction;
2930
+			$css_direction = '/@@@@@@/'.$css_direction;
2931 2931
 		}
2932 2932
 		$src[] = $regs[0][$k];
2933 2933
 		$src_direction_css[] = str_replace($import_css, $css_direction, (string) $regs[0][$k]);
@@ -2976,7 +2976,7 @@  discard block
 block discarded – undo
2976 2976
 
2977 2977
 	$f = basename($css, '.css');
2978 2978
 	$f = sous_repertoire(_DIR_VAR, 'cache-css')
2979
-		. preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f)
2979
+		. preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f)
2980 2980
 		. '.css';
2981 2981
 
2982 2982
 	if (@filemtime($f) > @filemtime($css) && _VAR_MODE != 'recalcul') {
@@ -2987,7 +2987,7 @@  discard block
 block discarded – undo
2987 2987
 	if ($url_absolue_css == $css) {
2988 2988
 		if (
2989 2989
 			strncmp((string) $GLOBALS['meta']['adresse_site'], $css, $l = strlen((string) $GLOBALS['meta']['adresse_site'])) != 0
2990
-			|| !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu)
2990
+			|| !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu)
2991 2991
 		) {
2992 2992
 			include_spip('inc/distant');
2993 2993
 			$contenu = recuperer_url($css);
@@ -3099,7 +3099,7 @@  discard block
 block discarded – undo
3099 3099
 	$expression = str_replace('\/', '/', $expression);
3100 3100
 	$expression = str_replace('/', '\/', $expression);
3101 3101
 
3102
-	if (preg_match('/' . $expression . '/' . $modif, $texte ?? '', $r)) {
3102
+	if (preg_match('/'.$expression.'/'.$modif, $texte ?? '', $r)) {
3103 3103
 		if (isset($r[$capte])) {
3104 3104
 			return $r[$capte];
3105 3105
 		} else {
@@ -3141,7 +3141,7 @@  discard block
 block discarded – undo
3141 3141
 	$expression = str_replace('\/', '/', $expression);
3142 3142
 	$expression = str_replace('/', '\/', $expression);
3143 3143
 
3144
-	return (string) preg_replace('/' . $expression . '/' . $modif, $replace, $texte);
3144
+	return (string) preg_replace('/'.$expression.'/'.$modif, $replace, $texte);
3145 3145
 }
3146 3146
 
3147 3147
 
@@ -3160,7 +3160,7 @@  discard block
 block discarded – undo
3160 3160
 function traiter_doublons_documents(&$doublons, $letexte) {
3161 3161
 
3162 3162
 	// Verifier dans le texte & les notes (pas beau, helas)
3163
-	$t = $letexte . $GLOBALS['les_notes'];
3163
+	$t = $letexte.$GLOBALS['les_notes'];
3164 3164
 
3165 3165
 	if (
3166 3166
 		strstr($t, 'spip_document_')
@@ -3174,7 +3174,7 @@  discard block
 block discarded – undo
3174 3174
 		if (!isset($doublons['documents'])) {
3175 3175
 			$doublons['documents'] = '';
3176 3176
 		}
3177
-		$doublons['documents'] .= ',' . implode(',', $matches[1]);
3177
+		$doublons['documents'] .= ','.implode(',', $matches[1]);
3178 3178
 	}
3179 3179
 
3180 3180
 	return $letexte;
@@ -3231,7 +3231,7 @@  discard block
 block discarded – undo
3231 3231
 	if ($env) {
3232 3232
 		foreach ($env as $i => $j) {
3233 3233
 			if (is_string($j) && !in_array($i, $ignore_params)) {
3234
-				$texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />";
3234
+				$texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />";
3235 3235
 			}
3236 3236
 		}
3237 3237
 	}
@@ -3270,7 +3270,7 @@  discard block
 block discarded – undo
3270 3270
 	if ($env) {
3271 3271
 		foreach ($env as $i => $j) {
3272 3272
 			if (is_string($j) && !in_array($i, $ignore_params)) {
3273
-				$texte .= attribut_html($i) . "='" . attribut_html($j) . "' ";
3273
+				$texte .= attribut_html($i)."='".attribut_html($j)."' ";
3274 3274
 			}
3275 3275
 		}
3276 3276
 	}
@@ -3344,11 +3344,11 @@  discard block
 block discarded – undo
3344 3344
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
3345 3345
 	if (
3346 3346
 		preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m)
3347
-		&& ($variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . '-xx.svg')
3347
+		&& ($variante_svg_generique = substr($img_file, 0, -strlen($m[0])).'-xx.svg')
3348 3348
 		&& file_exists($variante_svg_generique)
3349 3349
 	) {
3350 3350
 		if (
3351
-			($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg')
3351
+			($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].'.svg')
3352 3352
 			&& file_exists($variante_svg_size)
3353 3353
 		) {
3354 3354
 			$img_file = $variante_svg_size;
@@ -3404,7 +3404,7 @@  discard block
 block discarded – undo
3404 3404
 				return '';
3405 3405
 			}
3406 3406
 		}
3407
-		$atts .= " width='" . $largeur . "' height='" . $hauteur . "'";
3407
+		$atts .= " width='".$largeur."' height='".$hauteur."'";
3408 3408
 	}
3409 3409
 
3410 3410
 	if (file_exists($img_file)) {
@@ -3414,14 +3414,14 @@  discard block
 block discarded – undo
3414 3414
 		$alt = '';
3415 3415
 	}
3416 3416
 	elseif ($alt || $alt === '') {
3417
-		$alt = " alt='" . attribut_html($alt) . "'";
3417
+		$alt = " alt='".attribut_html($alt)."'";
3418 3418
 	}
3419 3419
 	else {
3420
-		$alt = " alt='" . attribut_html($title) . "'";
3420
+		$alt = " alt='".attribut_html($title)."'";
3421 3421
 	}
3422
-	return "<img src='" . attribut_html($img_file) . "'$alt"
3423
-	. ($title ? ' title="' . attribut_html($title) . '"' : '')
3424
-	. ' ' . ltrim($atts)
3422
+	return "<img src='".attribut_html($img_file)."'$alt"
3423
+	. ($title ? ' title="'.attribut_html($title).'"' : '')
3424
+	. ' '.ltrim($atts)
3425 3425
 	. ' />';
3426 3426
 }
3427 3427
 
@@ -3435,10 +3435,10 @@  discard block
 block discarded – undo
3435 3435
  */
3436 3436
 function http_style_background($img, $att = '', $size = null) {
3437 3437
 	if ($size && is_numeric($size)) {
3438
-		$size = trim($size) . 'px';
3438
+		$size = trim($size).'px';
3439 3439
 	}
3440
-	return " style='background" .
3441
-		($att ? '' : '-image') . ': url("' . chemin_image($img) . '")' . ($att ? (' ' . $att) : '') . ';'
3440
+	return " style='background".
3441
+		($att ? '' : '-image').': url("'.chemin_image($img).'")'.($att ? (' '.$att) : '').';'
3442 3442
 		. ($size ? "background-size:{$size};" : '')
3443 3443
 		. "'";
3444 3444
 }
@@ -3548,7 +3548,7 @@  discard block
 block discarded – undo
3548 3548
 		$img = http_img_pack(
3549 3549
 			$img,
3550 3550
 			$alt,
3551
-			$class ? " class='" . attribut_html($class) . "'" : '',
3551
+			$class ? " class='".attribut_html($class)."'" : '',
3552 3552
 			'',
3553 3553
 			['chemin_image' => false, 'utiliser_suffixe_size' => false]
3554 3554
 		);
@@ -3648,9 +3648,9 @@  discard block
 block discarded – undo
3648 3648
 	// regler le alt
3649 3649
 	if ($alt) {
3650 3650
 		$balise_svg = inserer_attribut($balise_svg, 'role', 'img');
3651
-		$id = 'img-svg-title-' . substr(md5("$img_file:$svg:$alt"), 0, 4);
3651
+		$id = 'img-svg-title-'.substr(md5("$img_file:$svg:$alt"), 0, 4);
3652 3652
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3653
-		$title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n";
3653
+		$title = "<title id=\"$id\">".entites_html($alt)."</title>\n";
3654 3654
 		$balise_svg .= $title;
3655 3655
 	}
3656 3656
 	else {
@@ -3842,7 +3842,7 @@  discard block
 block discarded – undo
3842 3842
 	}
3843 3843
 
3844 3844
 	$c = serialize($c);
3845
-	$cle = calculer_cle_action($form . $c);
3845
+	$cle = calculer_cle_action($form.$c);
3846 3846
 	$c = "$cle:$c";
3847 3847
 
3848 3848
 	// on ne stocke pas les contextes dans des fichiers en cache
@@ -3900,15 +3900,15 @@  discard block
 block discarded – undo
3900 3900
 	}
3901 3901
 	// toujours encoder l'url source dans le bloc ajax
3902 3902
 	$r = self();
3903
-	$r = ' data-origin="' . $r . '"';
3903
+	$r = ' data-origin="'.$r.'"';
3904 3904
 	$class = 'ajaxbloc';
3905 3905
 	if ($ajaxid && is_string($ajaxid)) {
3906 3906
 		// ajaxid est normalement conforme a un nom de classe css
3907 3907
 		// on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution
3908
-		$class .= ' ajax-id-' . entites_html($ajaxid);
3908
+		$class .= ' ajax-id-'.entites_html($ajaxid);
3909 3909
 	}
3910 3910
 
3911
-	return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3911
+	return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3912 3912
 }
3913 3913
 
3914 3914
 /**
@@ -3953,7 +3953,7 @@  discard block
 block discarded – undo
3953 3953
 		$cle = substr((string) $c, 0, $p);
3954 3954
 		$c = substr((string) $c, $p + 1);
3955 3955
 
3956
-		if ($cle === calculer_cle_action($form . $c)) {
3956
+		if ($cle === calculer_cle_action($form.$c)) {
3957 3957
 			return @unserialize($c);
3958 3958
 		}
3959 3959
 	}
@@ -4073,13 +4073,13 @@  discard block
 block discarded – undo
4073 4073
 				}
4074 4074
 			}
4075 4075
 		}
4076
-		$att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"';
4076
+		$att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"';
4077 4077
 	} else {
4078 4078
 		$bal = 'a';
4079 4079
 		$att = "href='$url'"
4080
-			. ($title ? " title='" . attribut_html($title) . "'" : '')
4081
-			. ($class ? " class='" . attribut_html($class) . "'" : '')
4082
-			. ($rel ? " rel='" . attribut_html($rel) . "'" : '')
4080
+			. ($title ? " title='".attribut_html($title)."'" : '')
4081
+			. ($class ? " class='".attribut_html($class)."'" : '')
4082
+			. ($rel ? " rel='".attribut_html($rel)."'" : '')
4083 4083
 			. $evt;
4084 4084
 	}
4085 4085
 	if ($libelle === null) {
@@ -4216,7 +4216,7 @@  discard block
 block discarded – undo
4216 4216
 
4217 4217
 	// Icône
4218 4218
 	$icone = http_img_pack($fond, $alt, "width='$size' height='$size'");
4219
-	$icone = '<span class="icone-image' . ($fonction ? " icone-fonction icone-fonction-$fonction" : '') . "\">$icone</span>";
4219
+	$icone = '<span class="icone-image'.($fonction ? " icone-fonction icone-fonction-$fonction" : '')."\">$icone</span>";
4220 4220
 
4221 4221
 	// Markup final
4222 4222
 	if ($type == 'lien') {
@@ -4491,16 +4491,16 @@  discard block
 block discarded – undo
4491 4491
 		$class_form = 'ajax';
4492 4492
 		$class = str_replace('ajax', '', $class);
4493 4493
 	}
4494
-	$class_btn = 'submit ' . trim($class);
4494
+	$class_btn = 'submit '.trim($class);
4495 4495
 
4496 4496
 	if ($confirm) {
4497
-		$confirm = 'confirm("' . attribut_html($confirm) . '")';
4497
+		$confirm = 'confirm("'.attribut_html($confirm).'")';
4498 4498
 		$callback = $callback ? "$confirm?($callback):false" : $confirm;
4499 4499
 	}
4500
-	$onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : '';
4500
+	$onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : '';
4501 4501
 	$title = $title ? " title='$title'" : '';
4502 4502
 
4503
-	return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>" . form_hidden($url)
4503
+	return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>".form_hidden($url)
4504 4504
 	. "<button type='submit' class='$class_btn'$title$onclick>$libelle</button></div></form>";
4505 4505
 }
4506 4506
 
@@ -4564,14 +4564,14 @@  discard block
 block discarded – undo
4564 4564
 		$champ_titre = '';
4565 4565
 		if ($demande_titre) {
4566 4566
 			// si pas de titre declare mais champ titre, il sera peuple par le select *
4567
-			$champ_titre = (empty($desc['titre'])) ? '' : ', ' . $desc['titre'];
4567
+			$champ_titre = (empty($desc['titre'])) ? '' : ', '.$desc['titre'];
4568 4568
 		}
4569 4569
 		include_spip('base/abstract_sql');
4570 4570
 		include_spip('base/connect_sql');
4571 4571
 		$objets[$type_objet][$id_objet] = sql_fetsel(
4572
-			'*' . $champ_titre,
4572
+			'*'.$champ_titre,
4573 4573
 			$desc['table_sql'],
4574
-			id_table_objet($type_objet) . ' = ' . (int) $id_objet
4574
+			id_table_objet($type_objet).' = '.(int) $id_objet
4575 4575
 		);
4576 4576
 
4577 4577
 		// Toujours noter la longueur d'introduction, même si pas demandé cette fois-ci
@@ -4660,8 +4660,7 @@  discard block
 block discarded – undo
4660 4660
 	if (isset($ligne_sql['chapo'])) {
4661 4661
 		$chapo = $ligne_sql['chapo'];
4662 4662
 		$texte = strlen((string) $descriptif) ?
4663
-			'' :
4664
-			"$chapo \n\n $texte";
4663
+			'' : "$chapo \n\n $texte";
4665 4664
 	}
4666 4665
 
4667 4666
 	// Longueur en paramètre, sinon celle renseignée dans la description de l'objet, sinon valeur en dur
@@ -4725,7 +4724,7 @@  discard block
 block discarded – undo
4725 4724
 		return $texte;
4726 4725
 	}
4727 4726
 
4728
-	$traitement = str_replace('%s', "'" . texte_script($texte) . "'", (string) $traitement);
4727
+	$traitement = str_replace('%s', "'".texte_script($texte)."'", (string) $traitement);
4729 4728
 
4730 4729
 	// signaler qu'on est dans l'espace prive pour les filtres qui se servent de ce flag
4731 4730
 	if (test_espace_prive()) {
@@ -4761,7 +4760,7 @@  discard block
 block discarded – undo
4761 4760
 	}
4762 4761
 	$url = generer_objet_url($id_objet, $objet, '', '', null, '', $connect);
4763 4762
 
4764
-	return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . '</a>';
4763
+	return "<a href='$url' class='$objet'>".couper($titre, $longueur).'</a>';
4765 4764
 }
4766 4765
 
4767 4766
 /**
@@ -4779,9 +4778,9 @@  discard block
 block discarded – undo
4779 4778
 function wrap($texte, $wrap) {
4780 4779
 	$balises = extraire_balises($wrap);
4781 4780
 	if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) {
4782
-		$texte = $wrap . $texte;
4781
+		$texte = $wrap.$texte;
4783 4782
 		$regs = array_reverse($regs[1]);
4784
-		$wrap = '</' . implode('></', $regs) . '>';
4783
+		$wrap = '</'.implode('></', $regs).'>';
4785 4784
 		$texte .= $wrap;
4786 4785
 	}
4787 4786
 
@@ -4811,7 +4810,7 @@  discard block
 block discarded – undo
4811 4810
 
4812 4811
 	// caster $u en array si besoin
4813 4812
 	if (is_object($u)) {
4814
-		$u = (array)$u;
4813
+		$u = (array) $u;
4815 4814
 	}
4816 4815
 
4817 4816
 	if (is_array($u)) {
@@ -4833,7 +4832,7 @@  discard block
 block discarded – undo
4833 4832
 		// sinon on passe a la ligne et on indente
4834 4833
 		$i_str = str_pad('', $indent, ' ');
4835 4834
 		foreach ($u as $k => $v) {
4836
-			$out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2);
4835
+			$out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2);
4837 4836
 		}
4838 4837
 
4839 4838
 		return $out;
@@ -4887,7 +4886,7 @@  discard block
 block discarded – undo
4887 4886
  * @return string
4888 4887
  */
4889 4888
 function objet_icone($objet, $taille = 24, $class = '') {
4890
-	$icone = objet_info($objet, 'icone_objet') . '-' . $taille . '.png';
4889
+	$icone = objet_info($objet, 'icone_objet').'-'.$taille.'.png';
4891 4890
 	$icone = chemin_image($icone);
4892 4891
 	$balise_img = charger_filtre('balise_img');
4893 4892
 
@@ -4913,7 +4912,7 @@  discard block
 block discarded – undo
4913 4912
  */
4914 4913
 function objet_T($objet, $chaine, $args = [], $options = []) {
4915 4914
 	$chaine = explode(':', $chaine);
4916
-	if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, ['force' => false]))) {
4915
+	if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, ['force' => false]))) {
4917 4916
 		return $t;
4918 4917
 	}
4919 4918
 	$chaine = implode(':', $chaine);
@@ -4979,7 +4978,7 @@  discard block
 block discarded – undo
4979 4978
 	$cache = recuperer_fond($fond, $contexte, $options, $connect);
4980 4979
 
4981 4980
 	// calculer le nom de la css
4982
-	$dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension);
4981
+	$dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension);
4983 4982
 	$nom_safe = preg_replace(',\W,', '_', str_replace('.', '_', $fond));
4984 4983
 	$contexte_implicite = calculer_contexte_implicite();
4985 4984
 
@@ -4987,14 +4986,14 @@  discard block
 block discarded – undo
4987 4986
 	// mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu
4988 4987
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
4989 4988
 	if (isset($options['hash_on_content']) && $options['hash_on_content']) {
4990
-		$hash = md5((string) ($contexte_implicite['host'] . '::' . $cache));
4989
+		$hash = md5((string) ($contexte_implicite['host'].'::'.$cache));
4991 4990
 	}
4992 4991
 	else {
4993 4992
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
4994 4993
 		ksort($contexte);
4995
-		$hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect);
4994
+		$hash = md5($fond.json_encode($contexte_implicite, JSON_THROW_ON_ERROR).json_encode($contexte, JSON_THROW_ON_ERROR).$connect);
4996 4995
 	}
4997
-	$filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension";
4996
+	$filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension";
4998 4997
 
4999 4998
 	// mettre a jour le fichier si il n'existe pas
5000 4999
 	// ou trop ancien
@@ -5002,8 +5001,8 @@  discard block
 block discarded – undo
5002 5001
 	// et recopie sur le fichier cible uniquement si il change
5003 5002
 	if (
5004 5003
 		!file_exists($filename)
5005
-		|| !file_exists($filename . '.last')
5006
-		|| isset($cache['lastmodified']) && $cache['lastmodified'] && filemtime($filename . '.last') < $cache['lastmodified']
5004
+		|| !file_exists($filename.'.last')
5005
+		|| isset($cache['lastmodified']) && $cache['lastmodified'] && filemtime($filename.'.last') < $cache['lastmodified']
5007 5006
 		|| defined('_VAR_MODE') && _VAR_MODE == 'recalcul'
5008 5007
 	) {
5009 5008
 		$contenu = $cache['texte'];
@@ -5027,10 +5026,10 @@  discard block
 block discarded – undo
5027 5026
 			}
5028 5027
 			// pas de date dans le commentaire car sinon ca invalide le md5 et force la maj
5029 5028
 			// mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non
5030
-			$comment .= "}\n   md5:" . md5((string) $contenu) . " */\n";
5029
+			$comment .= "}\n   md5:".md5((string) $contenu)." */\n";
5031 5030
 		}
5032 5031
 		// et ecrire le fichier si il change
5033
-		ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true);
5032
+		ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true);
5034 5033
 	}
5035 5034
 
5036 5035
 	return timestamp($filename);
@@ -5257,7 +5256,7 @@  discard block
 block discarded – undo
5257 5256
 	if ($e > 0 && strlen($mid) > 8) {
5258 5257
 		$mid = '***...***';
5259 5258
 	}
5260
-	return substr($passe, 0, $e) . $mid . ($e > 0 ? substr($passe, -$e) : '');
5259
+	return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : '');
5261 5260
 }
5262 5261
 
5263 5262
 
@@ -5319,7 +5318,7 @@  discard block
 block discarded – undo
5319 5318
 		case 'id':
5320 5319
 		case 'anchor':
5321 5320
 			if (preg_match(',^\d,', $texte)) {
5322
-				$texte = substr($type, 0, 1) . $texte;
5321
+				$texte = substr($type, 0, 1).$texte;
5323 5322
 			}
5324 5323
 	}
5325 5324
 
@@ -5329,9 +5328,9 @@  discard block
 block discarded – undo
5329 5328
 
5330 5329
 	if (strlen($texte) < $longueur_mini && $longueur_mini < $longueur_maxi) {
5331 5330
 		if (preg_match(',^\d,', $texte)) {
5332
-			$texte = ($type ? substr($type, 0, 1) : 's') . $texte;
5331
+			$texte = ($type ? substr($type, 0, 1) : 's').$texte;
5333 5332
 		}
5334
-		$texte .= $separateur . md5($original);
5333
+		$texte .= $separateur.md5($original);
5335 5334
 		$texte = substr($texte, 0, $longueur_mini);
5336 5335
 	}
5337 5336
 
Please login to merge, or discard this patch.
ecrire/inc/editer.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$res['message_ok'] = _T('info_modification_enregistree');
100 100
 		if ($retour) {
101 101
 			if (str_starts_with($retour, 'javascript:')) {
102
-				$res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/' . substr($retour, 11) . '/*]]>*/</script>';
102
+				$res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/'.substr($retour, 11).'/*]]>*/</script>';
103 103
 				$res['editable'] = true;
104 104
 			} else {
105 105
 				$res['redirect'] = parametre_url($retour, $id_table_objet, $id);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 				if (!isset($erreurs[$champ])) {
140 140
 					$erreurs[$champ] = '';
141 141
 				}
142
-				$erreurs[$champ] .= _T('alerte_modif_info_concourante') . "<br /><textarea readonly='readonly' class='forml'>" . entites_html($conflit['base']) . '</textarea>';
142
+				$erreurs[$champ] .= _T('alerte_modif_info_concourante')."<br /><textarea readonly='readonly' class='forml'>".entites_html($conflit['base']).'</textarea>';
143 143
 			}
144 144
 		}
145 145
 	}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	if (
220 220
 		$config_fonc
221 221
 		&& !in_array($config_fonc, ['articles_edit_config', 'rubriques_edit_config', 'auteurs_edit_config'])
222
-		&& $config_fonc !== $table_objet . '_edit_config'
222
+		&& $config_fonc !== $table_objet.'_edit_config'
223 223
 		&& ($args = test_formulaire_inclus_par_modele())
224 224
 		&& in_array($config_fonc, $args)
225 225
 	) {
@@ -231,12 +231,12 @@  discard block
 block discarded – undo
231 231
 	// Appel direct dans un squelette
232 232
 	if (!$row) {
233 233
 		if (!$new || $lier_trad) {
234
-			if ($select = charger_fonction('precharger_' . $type, 'inc', true)) {
234
+			if ($select = charger_fonction('precharger_'.$type, 'inc', true)) {
235 235
 				$row = $select($id, $id_parent, $lier_trad);
236 236
 				// si on a une fonction precharger, elle pu faire un reglage de langue
237 237
 				$lang_default = (empty($row['lang']) ? null : $row['lang']);
238 238
 			} else {
239
-				$row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . (int) $id);
239
+				$row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.(int) $id);
240 240
 			}
241 241
 			if (!$new) {
242 242
 				$md5 = controles_md5($row ?: []);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 		$contexte['config'] = $config = $config_fonc($contexte);
288 288
 		if (!$lang_default) {
289 289
 			include_spip('inc/session');
290
-			$lang_default = $config['langue'] ?? session_get('lang') ;
290
+			$lang_default = $config['langue'] ?? session_get('lang');
291 291
 		}
292 292
 	}
293 293
 	$config += [
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
 		unset($contexte['lang']);
310 310
 	}
311 311
 
312
-	$contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" .
312
+	$contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n".
313 313
 		($lier_trad
314
-			 ? "\n<input type='hidden' name='lier_trad' value='" .
315
-				$lier_trad .
316
-				"' />" .
317
-				"\n<input type='hidden' name='changer_lang' value='" .
318
-				$lang_default .
314
+			 ? "\n<input type='hidden' name='lier_trad' value='".
315
+				$lier_trad.
316
+				"' />".
317
+				"\n<input type='hidden' name='changer_lang' value='".
318
+				$lang_default.
319 319
 				"' />"
320 320
 			: '')
321 321
 		. $hidden
@@ -356,14 +356,14 @@  discard block
 block discarded – undo
356 356
 	$aider = charger_fonction('aider', 'inc');
357 357
 	if (strlen($texte) > 28 * 1024) {
358 358
 		$texte = str_replace("\r\n", "\n", $texte);
359
-		$pos = strpos($texte, "\n\n", 28 * 1024);  // coupe para > 28 ko
359
+		$pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko
360 360
 		if ($pos > 0 && $pos < 32 * 1024) {
361
-			$debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n";
361
+			$debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n";
362 362
 			$suite = substr($texte, $pos + 2);
363 363
 		} else {
364
-			$pos = strpos($texte, ' ', 28 * 1024);  // sinon coupe espace
364
+			$pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace
365 365
 			if (!($pos > 0 && $pos < 32 * 1024)) {
366
-				$pos = 28 * 1024;  // au pire (pas d'espace trouv'e)
366
+				$pos = 28 * 1024; // au pire (pas d'espace trouv'e)
367 367
 				$decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere
368 368
 			} else {
369 369
 				$decalage = 1;
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 	$ctr = [];
451 451
 	foreach ($data as $key => $val) {
452 452
 		$m = md5($val ?? '');
453
-		$k = $prefixe . $key;
453
+		$k = $prefixe.$key;
454 454
 
455 455
 		$ctr[$k] = match ($format) {
456 456
 			'html' => "<input type='hidden' value='$m' name='$k' />",
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 	}
460 460
 
461 461
 	if ($format === 'html') {
462
-		return "\n\n<!-- controles md5 -->\n" . implode("\n", $ctr) . "\n\n";
462
+		return "\n\n<!-- controles md5 -->\n".implode("\n", $ctr)."\n\n";
463 463
 	} else {
464 464
 		return $ctr;
465 465
 	}
@@ -612,8 +612,8 @@  discard block
 block discarded – undo
612 612
 	// potentiellement modifiees entre temps par un autre utilisateur)
613 613
 	foreach ($champs as $key => $val) {
614 614
 		if (
615
-			isset($ctr[$prefix . $key])
616
-			&& ($m = $ctr[$prefix . $key])
615
+			isset($ctr[$prefix.$key])
616
+			&& ($m = $ctr[$prefix.$key])
617 617
 			&& (is_scalar($val) && $m == md5($val))
618 618
 		) {
619 619
 			unset($champs[$key]);
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 	// de conflit.
643 643
 	$ctrh = $ctrq = $conflits = [];
644 644
 	foreach (array_keys($champs) as $key) {
645
-		if (isset($ctr[$prefix . $key]) && ($m = $ctr[$prefix . $key])) {
645
+		if (isset($ctr[$prefix.$key]) && ($m = $ctr[$prefix.$key])) {
646 646
 			$ctrh[$key] = $m;
647 647
 			$ctrq[] = $key;
648 648
 		}
@@ -676,8 +676,8 @@  discard block
 block discarded – undo
676 676
  */
677 677
 function display_conflit_champ($x) {
678 678
 	if (strstr($x, "\n") || strlen($x) > 80) {
679
-		return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n";
679
+		return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n";
680 680
 	} else {
681
-		return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n";
681
+		return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n";
682 682
 	}
683 683
 }
Please login to merge, or discard this patch.
ecrire/inc/lang.php 1 patch
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	if (is_null($liste_langues)) {
46
-		$liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '') . ',' . ($GLOBALS['meta']['langues_multilingue'] ?? '');
46
+		$liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '').','.($GLOBALS['meta']['langues_multilingue'] ?? '');
47 47
 	} else {
48 48
 		if (is_array($liste_langues)) {
49 49
 			$liste_langues = implode(',', $liste_langues);
50 50
 		}
51 51
 	}
52
-	$liste_langues = ',' . $liste_langues . ',';
52
+	$liste_langues = ','.$liste_langues.',';
53 53
 
54 54
 	// Si la langue demandee n'existe pas, on essaie d'autres variantes
55 55
 	// Exemple : 'pt-br' => 'pt_br' => 'pt'
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	}
192 192
 	foreach ($langues as $l) {
193 193
 		$selected = ($l == $default) ? ' selected=\'selected\'' : '';
194
-		$ret .= "<option value='$l'$selected>[" . $l . '] ' . traduire_nom_langue($l) . "</option>\n";
194
+		$ret .= "<option value='$l'$selected>[".$l.'] '.traduire_nom_langue($l)."</option>\n";
195 195
 	}
196 196
 
197 197
 	if (!test_espace_prive()) {
@@ -209,21 +209,20 @@  discard block
 block discarded – undo
209 209
 		$base,
210 210
 		$cible,
211 211
 		(select_langues($nom_select, $change, $ret)
212
-			. "<noscript><div style='display:inline'><input type='submit' class='fondo' value='" . _T('bouton_changer') . "' /></div></noscript>"),
212
+			. "<noscript><div style='display:inline'><input type='submit' class='fondo' value='"._T('bouton_changer')."' /></div></noscript>"),
213 213
 		" method='post'"
214 214
 	);
215 215
 }
216 216
 
217 217
 function select_langues($nom_select, $change, $options, $label = '') {
218 218
 	static $cpt = 0;
219
-	$id = 'menu_langues' . $cpt++;
219
+	$id = 'menu_langues'.$cpt++;
220 220
 
221 221
 	return
222
-		"<label for='$id'>" . ($label ?: _T('info_langues')) . '</label> ' .
222
+		"<label for='$id'>".($label ?: _T('info_langues')).'</label> '.
223 223
 		"<select name='$nom_select' id='$id' "
224 224
 		. ((test_espace_prive()) ?
225
-			(($nom_select == 'var_lang_ecrire' ? "class='lang_ecrire'" : "class='fondl'")) :
226
-			("class='forml menu_langues'"))
225
+			(($nom_select == 'var_lang_ecrire' ? "class='lang_ecrire'" : "class='fondl'")) : ("class='forml menu_langues'"))
227 226
 		. $change
228 227
 		. ">\n"
229 228
 		. $options
@@ -346,7 +345,7 @@  discard block
 block discarded – undo
346 345
 		isset($GLOBALS['meta']['langue_site'])
347 346
 		&& (!isset($GLOBALS['spip_lang']) || $GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site'])
348 347
 	) {
349
-		return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues);//@:install
348
+		return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues); //@:install
350 349
 	}
351 350
 	// en theorie là, la globale est définie, sinon c'est un problème.
352 351
 	if (!isset($GLOBALS['spip_lang'])) {
@@ -458,7 +457,7 @@  discard block
 block discarded – undo
458 457
 	if (!isset($GLOBALS['meta']['langue_site'])) {
459 458
 		// Initialisation : le francais si dispo, sinon la premiere langue trouvee
460 459
 		$GLOBALS['meta']['langue_site'] = $tout =
461
-			(!$all_langs || str_contains(',' . _LANGUE_PAR_DEFAUT . ',', (string) ",$all_langs,"))
460
+			(!$all_langs || str_contains(','._LANGUE_PAR_DEFAUT.',', (string) ",$all_langs,"))
462 461
 				? _LANGUE_PAR_DEFAUT
463 462
 				: substr((string) $all_langs, 0, strpos((string) $all_langs, ','));
464 463
 		ecrire_meta('langue_site', $tout);
Please login to merge, or discard this patch.