Completed
Push — master ( b2f238...42b790 )
by cam
01:39
created
ecrire/public/decompiler.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	$type .= ($struct->type_requete ?: $struct->table_optionnelle);
30 30
 
31 31
 	if ($struct->jointures_explicites) {
32
-		$type .= ' ' . $struct->jointures_explicites;
32
+		$type .= ' '.$struct->jointures_explicites;
33 33
 	}
34 34
 	if ($struct->table_optionnelle) {
35 35
 		$type .= '?';
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 
39 39
 	$crit = $struct->param;
40 40
 	if ($crit and !is_array($crit[0])) {
41
-		$type = strtolower($type) . array_shift($crit);
41
+		$type = strtolower($type).array_shift($crit);
42 42
 	}
43 43
 	$crit = decompiler_criteres($struct, $fmt, $prof);
44 44
 
45
-	$f = 'format_boucle_' . $fmt;
45
+	$f = 'format_boucle_'.$fmt;
46 46
 
47 47
 	return $f($preaff, $avant, $nom, $type, $crit, $milieu, $apres, $altern, $postaff, $prof);
48 48
 }
@@ -55,21 +55,20 @@  discard block
 block discarded – undo
55 55
 			$res[] = decompiler_($v, $fmt, $prof);
56 56
 		}
57 57
 	}
58
-	$file = is_string($struct->texte) ? $struct->texte :
59
-		decompiler_($struct->texte, $fmt, $prof);
60
-	$f = 'format_inclure_' . $fmt;
58
+	$file = is_string($struct->texte) ? $struct->texte : decompiler_($struct->texte, $fmt, $prof);
59
+	$f = 'format_inclure_'.$fmt;
61 60
 
62 61
 	return $f($file, $res, $prof);
63 62
 }
64 63
 
65 64
 function decompiler_texte($struct, $fmt = '', $prof = 0) {
66
-	$f = 'format_texte_' . $fmt;
65
+	$f = 'format_texte_'.$fmt;
67 66
 
68 67
 	return strlen($struct->texte) ? $f($struct->texte, $prof) : '';
69 68
 }
70 69
 
71 70
 function decompiler_polyglotte($struct, $fmt = '', $prof = 0) {
72
-	$f = 'format_polyglotte_' . $fmt;
71
+	$f = 'format_polyglotte_'.$fmt;
73 72
 
74 73
 	return $f($struct->traductions, $prof);
75 74
 }
@@ -82,7 +81,7 @@  discard block
 block discarded – undo
82 81
 
83 82
 	$filtres = decompiler_liste($struct->param, $fmt, $prof);
84 83
 
85
-	$f = 'format_idiome_' . $fmt;
84
+	$f = 'format_idiome_'.$fmt;
86 85
 
87 86
 	return $f($struct->nom_champ, $struct->module, $args, $filtres, $prof);
88 87
 }
@@ -97,7 +96,7 @@  discard block
 block discarded – undo
97 96
 		}
98 97
 		$filtres = decompiler_liste($p, $fmt, $prof);
99 98
 	}
100
-	$f = 'format_champ_' . $fmt;
99
+	$f = 'format_champ_'.$fmt;
101 100
 
102 101
 	return $f($struct->nom_champ, $struct->nom_boucle, $struct->etoile, $avant, $apres, $args, $filtres, $prof);
103 102
 }
@@ -106,7 +105,7 @@  discard block
 block discarded – undo
106 105
 	if (!is_array($sources)) {
107 106
 		return '';
108 107
 	}
109
-	$f = 'format_liste_' . $fmt;
108
+	$f = 'format_liste_'.$fmt;
110 109
 	$res = '';
111 110
 	foreach ($sources as $arg) {
112 111
 		if (!is_array($arg)) {
@@ -123,7 +122,7 @@  discard block
 block discarded – undo
123 122
 				and (strlen($v[0]->apres) == 1)
124 123
 				and $v[0]->apres == $v[0]->avant
125 124
 			) {
126
-				$args[] = $v[0]->avant . $v[0]->texte . $v[0]->apres;
125
+				$args[] = $v[0]->avant.$v[0]->texte.$v[0]->apres;
127 126
 			} else {
128 127
 				$args[] = decompiler_($v, $fmt, 0 - $prof);
129 128
 			}
@@ -146,7 +145,7 @@  discard block
 block discarded – undo
146 145
 		return '';
147 146
 	}
148 147
 	$res = '';
149
-	$f = 'format_critere_' . $fmt;
148
+	$f = 'format_critere_'.$fmt;
150 149
 	foreach ($sources as $crit) {
151 150
 		if (!is_array($crit)) {
152 151
 			continue;
@@ -159,13 +158,13 @@  discard block
 block discarded – undo
159 158
 				and $v[0]->type == 'texte'
160 159
 				and $v[0]->apres
161 160
 			) {
162
-				$args[] = [['texte', ($v[0]->apres . $v[0]->texte . $v[0]->apres)]];
161
+				$args[] = [['texte', ($v[0]->apres.$v[0]->texte.$v[0]->apres)]];
163 162
 			} else {
164 163
 				$res2 = [];
165 164
 				foreach ($v as $k => $p) {
166 165
 					if (
167 166
 						isset($p->type)
168
-						and function_exists($d = 'decompiler_' . $p->type)
167
+						and function_exists($d = 'decompiler_'.$p->type)
169 168
 					) {
170 169
 						$r = $d($p, $fmt, (0 - $prof), @$v[$k + 1]);
171 170
 						$res2[] = [$p->type, $r];
@@ -193,7 +192,7 @@  discard block
 block discarded – undo
193 192
 		if (!isset($p->type)) {
194 193
 			continue;
195 194
 		} #??????
196
-		$d = 'decompiler_' . $p->type;
195
+		$d = 'decompiler_'.$p->type;
197 196
 		$next = $liste[$k + 1] ?? false;
198 197
 		// Forcer le champ etendu si son source (pas les reecritures)
199 198
 		// contenait des args et s'il est suivi d'espaces,
@@ -218,16 +217,16 @@  discard block
 block discarded – undo
218 217
 		}
219 218
 		$contenu[] = [$d($p, $fmt, $prof2), $p->type];
220 219
 	}
221
-	$f = 'format_suite_' . $fmt;
220
+	$f = 'format_suite_'.$fmt;
222 221
 
223 222
 	return $f($contenu);
224 223
 }
225 224
 
226 225
 function public_decompiler($liste, $fmt = '', $prof = 0, $quoi = '') {
227
-	if (!include_spip('public/format_' . $fmt)) {
226
+	if (!include_spip('public/format_'.$fmt)) {
228 227
 		return "'$fmt'?";
229 228
 	}
230
-	$f = 'decompiler_' . $quoi;
229
+	$f = 'decompiler_'.$quoi;
231 230
 
232 231
 	return $f($liste, $fmt, $prof);
233 232
 }
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
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		$GLOBALS['debug_objets']['courant'] = $nom;
57 57
 	}
58 58
 
59
-	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php';
59
+	$phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php';
60 60
 
61 61
 	// si squelette est deja compile et perenne, le charger
62 62
 	if (!squelette_obsolete($phpfile, $source)) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		#}
70 70
 	}
71 71
 
72
-	if (file_exists($lib = $squelette . '_fonctions' . '.php')) {
72
+	if (file_exists($lib = $squelette.'_fonctions'.'.php')) {
73 73
 		include_once $lib;
74 74
 	}
75 75
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 			eval("return true; $f ;");
98 98
 		} catch (\ParseError $e) {
99 99
 			// Code syntaxiquement faux (critere etc mal programme')
100
-			$msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage();
100
+			$msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage();
101 101
 			erreur_squelette($msg, $boucle);
102 102
 			// continuer pour trouver d'autres fautes eventuelles
103 103
 			// mais prevenir que c'est mort
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 	if (defined('_VAR_MODE') and _VAR_MODE == 'debug') {
127 127
 		// Tracer ce qui vient d'etre compile
128
-		$GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code;
128
+		$GLOBALS['debug_objets']['code'][$nom.'tout'] = $code;
129 129
 
130 130
 		// si c'est ce que demande le debusqueur, lui passer la main
131 131
 		if (
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 		$code = "
150 150
 /*
151 151
  * Squelette : $sourcefile
152
- * Date :      " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT
153
- * Compile :   ' . gmdate('D, d M Y H:i:s', time()) . ' GMT
154
- * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   ' . $noms)) . '
152
+ * Date :      ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT
153
+ * Compile :   ' . gmdate('D, d M Y H:i:s', time()).' GMT
154
+ * ' . (!$boucles ? 'Pas de boucle' : ('Boucles :   '.$noms)).'
155 155
  */ ';
156 156
 	}
157 157
 
158
-	$code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>';
158
+	$code = '<'."?php\n".$code.join('', $boucles)."\n?".'>';
159 159
 	if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) {
160 160
 		ecrire_fichier($phpfile, $code);
161 161
 	}
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 			$j = join('-', array_map('ucwords', explode('-', strtolower($r[2]))));
220 220
 
221 221
 			if ($j == 'X-Spip-Filtre' and isset($headers[$j])) {
222
-				$headers[$j] .= '|' . $r[3];
222
+				$headers[$j] .= '|'.$r[3];
223 223
 			} else {
224 224
 				$headers[$j] = $r[3];
225 225
 			}
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
 	}
228 228
 	// S'agit-il d'un resultat constant ou contenant du code php
229 229
 	$process_ins = (
230
-		strpos($corps, '<' . '?') === false
230
+		strpos($corps, '<'.'?') === false
231 231
 		or
232
-		(strpos($corps, '<' . '?xml') !== false and
233
-			strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
232
+		(strpos($corps, '<'.'?xml') !== false and
233
+			strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
234 234
 	)
235 235
 		? 'html'
236 236
 		: 'php';
@@ -259,10 +259,10 @@  discard block
 block discarded – undo
259 259
 
260 260
 		if ($process_ins == 'html') {
261 261
 			$skel['process_ins'] = (
262
-				strpos($corps, '<' . '?') === false
262
+				strpos($corps, '<'.'?') === false
263 263
 				or
264
-				(strpos($corps, '<' . '?xml') !== false and
265
-					strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false)
264
+				(strpos($corps, '<'.'?xml') !== false and
265
+					strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false)
266 266
 			)
267 267
 				? 'html'
268 268
 				: 'php';
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 //
281 281
 
282 282
 /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */
283
-define('CODE_INCLURE_BALISE', '<' . '?php 
283
+define('CODE_INCLURE_BALISE', '<'.'?php 
284 284
 include_once("%s");
285 285
 if ($lang_select = "%s") $lang_select = lang_select($lang_select);
286 286
 inserer_balise_dynamique(balise_%s_dyn(%s), array(%s));
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 		// pas de lien symbolique sous Windows
312 312
 		and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false)
313 313
 	) {
314
-		$file = './" . _DIR_RACINE . "' . $file;
314
+		$file = './" . _DIR_RACINE . "'.$file;
315 315
 	}
316 316
 
317 317
 	$lang = $context_compil[4];
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
 	$args = array_map('argumenter_squelette', $args);
323 323
 	if (!empty($context_compil['appel_php_depuis_modele'])) {
324
-		$args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')';
324
+		$args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')';
325 325
 	}
326 326
 	$args = join(', ', $args);
327 327
 
@@ -355,14 +355,14 @@  discard block
 block discarded – undo
355 355
 	if (is_object($v)) {
356 356
 		return var_export($v, true);
357 357
 	} elseif (!is_array($v)) {
358
-		return "'" . texte_script((string) $v) . "'";
358
+		return "'".texte_script((string) $v)."'";
359 359
 	} else {
360 360
 		$out = [];
361 361
 		foreach ($v as $k => $val) {
362
-			$out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val);
362
+			$out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val);
363 363
 		}
364 364
 
365
-		return 'array(' . join(', ', $out) . ')';
365
+		return 'array('.join(', ', $out).')';
366 366
 	}
367 367
 }
368 368
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 	}
441 441
 
442 442
 	// Y a-t-il une fonction de traitement des arguments ?
443
-	$f = 'balise_' . $nom_balise . '_stat';
443
+	$f = 'balise_'.$nom_balise.'_stat';
444 444
 
445 445
 	$r = !function_exists($f) ? $args : $f($args, $context_compil);
446 446
 
@@ -450,18 +450,18 @@  discard block
 block discarded – undo
450 450
 
451 451
 	// verifier que la fonction dyn est la,
452 452
 	// sinon se replier sur la generique si elle existe
453
-	if (!function_exists('balise_' . $nom_balise . '_dyn')) {
453
+	if (!function_exists('balise_'.$nom_balise.'_dyn')) {
454 454
 		if (
455 455
 			$balise_generique = chercher_balise_generique($nom)
456 456
 			and $nom_balise_generique = $balise_generique['nom_generique']
457
-			and $file = include_spip('balise/' . strtolower($nom_balise_generique))
458
-			and function_exists('balise_' . $nom_balise_generique . '_dyn')
457
+			and $file = include_spip('balise/'.strtolower($nom_balise_generique))
458
+			and function_exists('balise_'.$nom_balise_generique.'_dyn')
459 459
 		) {
460 460
 			// et lui injecter en premier arg le nom de la balise
461 461
 			array_unshift($r, $nom);
462 462
 			$nom_balise = $nom_balise_generique;
463 463
 			if (!_DIR_RESTREINT) {
464
-				$file = _DIR_RESTREINT_ABS . $file;
464
+				$file = _DIR_RESTREINT_ABS.$file;
465 465
 			}
466 466
 		} else {
467 467
 			$msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]];
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 		$n = '';
564 564
 		foreach (explode(',', $liste) as $val) {
565 565
 			if ($a = intval($val) and $val === strval($a)) {
566
-				$n .= ',' . $val;
566
+				$n .= ','.$val;
567 567
 			}
568 568
 		}
569 569
 		if (strlen($n)) {
@@ -742,8 +742,8 @@  discard block
 block discarded – undo
742 742
 			// on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction
743 743
 			$i = 0;
744 744
 			do {
745
-				$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
746
-					[$sous[1] . ' AS id'],
745
+				$where[$k] = remplace_sous_requete($w, '('.calculer_select(
746
+					[$sous[1].' AS id'],
747 747
 					$from,
748 748
 					$from_type,
749 749
 					$wheresub,
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
 					$id,
757 757
 					$serveur,
758 758
 					false
759
-				) . ')');
759
+				).')');
760 760
 				if (!$i) {
761 761
 					$i = 1;
762 762
 					$wherestring = calculer_where_to_string($where[$k]);
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 		if ($sous[0] == 'SUBSELECT') {
777 777
 			// c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having)
778 778
 			array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ?
779
-			$where[$k] = remplace_sous_requete($w, '(' . calculer_select(
779
+			$where[$k] = remplace_sous_requete($w, '('.calculer_select(
780 780
 				$sous[1], # select
781 781
 				$sous[2], #from
782 782
 				[], #from_type
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 				$id,
792 792
 				$serveur,
793 793
 				false
794
-			) . ')');
794
+			).')');
795 795
 		}
796 796
 		array_pop($where_simples);
797 797
 	}
@@ -854,15 +854,15 @@  discard block
 block discarded – undo
854 854
 			// sans recours a preg_match
855 855
 			// un implode(' ',..) est fait dans reinjecte_joint un peu plus bas
856 856
 			$afrom[$t][$cle] = [
857
-				"\n" .
858
-				($from_type[$cle] ?? 'INNER') . ' JOIN',
857
+				"\n".
858
+				($from_type[$cle] ?? 'INNER').' JOIN',
859 859
 				$from[$cle],
860 860
 				"AS $cle",
861 861
 				'ON (',
862 862
 				"$cle.$c",
863 863
 				'=',
864 864
 				"$t.$carr",
865
-				($and ? 'AND ' . $and : '') .
865
+				($and ? 'AND '.$and : '').
866 866
 				')'
867 867
 			];
868 868
 			if (isset($afrom[$cle])) {
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 		$t = key($from);
901 901
 		$c = current($from);
902 902
 		reset($from);
903
-		$e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/';
903
+		$e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/';
904 904
 		if (
905 905
 			!(strpos($t, ' ') or // jointure des le depart cf boucle_doc
906 906
 				calculer_jointnul($t, $select, $e) or
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
 			unset($afrom[$t][$nt]);
919 919
 			$afrom[$nt] = $afrom[$t];
920 920
 			unset($afrom[$t]);
921
-			$e = '/\b' . preg_quote($nfrom[6]) . '\b/';
921
+			$e = '/\b'.preg_quote($nfrom[6]).'\b/';
922 922
 			$t = $nfrom[4];
923 923
 			$alias = '';
924 924
 			// verifier que les deux cles sont homonymes, sinon installer un alias dans le select
@@ -929,14 +929,14 @@  discard block
 block discarded – undo
929 929
 			if ($newcle != $oldcle) {
930 930
 				// si l'ancienne cle etait deja dans le select avec un AS
931 931
 				// reprendre simplement ce AS
932
-				$as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/';
932
+				$as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/';
933 933
 				if (preg_match($as, implode(',', $select), $m)) {
934 934
 					$alias = '';
935 935
 				} else {
936
-					$alias = ', ' . $nfrom[4] . " AS $oldcle";
936
+					$alias = ', '.$nfrom[4]." AS $oldcle";
937 937
 				}
938 938
 			}
939
-			$select = remplacer_jointnul($t . $alias, $select, $e);
939
+			$select = remplacer_jointnul($t.$alias, $select, $e);
940 940
 			$join = remplacer_jointnul($t, $join, $e);
941 941
 			$where = remplacer_jointnul($t, $where, $e);
942 942
 			$having = remplacer_jointnul($t, $having, $e);
@@ -986,9 +986,9 @@  discard block
 block discarded – undo
986 986
 	} else {
987 987
 		$exp = '';
988 988
 		if (strtoupper($join) === 'AND') {
989
-			return $exp . join(" $join ", array_map('calculer_where_to_string', $v));
989
+			return $exp.join(" $join ", array_map('calculer_where_to_string', $v));
990 990
 		} else {
991
-			return $exp . join($join, $v);
991
+			return $exp.join($join, $v);
992 992
 		}
993 993
 	}
994 994
 }
@@ -1054,6 +1054,6 @@  discard block
 block discarded – undo
1054 1054
 	}
1055 1055
 
1056 1056
 	return $mime_type
1057
-	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_'
1058
-	. md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : ''));
1057
+	. (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_'
1058
+	. md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : ''));
1059 1059
 }
Please login to merge, or discard this patch.
ecrire/public/iterateur.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 				// (pas glop)
54 54
 				try {
55 55
 					switch (is_countable($a) ? count($a) : 0) {
56
-						case 0:
57
-							$iter = new $iterateur();
56
+						case 0 : $iter = new $iterateur();
58 57
 							break;
59 58
 						case 1:
60 59
 							$iter = new $iterateur($a[0]);
@@ -79,10 +78,10 @@  discard block
 block discarded – undo
79 78
 			// chercher la classe d'iterateur
80 79
 			// IterateurXXX
81 80
 			// definie dans le fichier iterateurs/xxx.php
82
-			$class = 'Iterateur' . $iterateur;
81
+			$class = 'Iterateur'.$iterateur;
83 82
 			if (!class_exists($class)) {
84 83
 				if (
85
-					!include_spip('iterateur/' . strtolower($iterateur))
84
+					!include_spip('iterateur/'.strtolower($iterateur))
86 85
 					or !class_exists($class)
87 86
 				) {
88 87
 					die("Iterateur $iterateur non trouv&#233;");
@@ -210,7 +209,7 @@  discard block
 block discarded – undo
210 209
 				return $this->iter->$nom();
211 210
 			} catch (Exception $e) {
212 211
 				// #GETCHILDREN sur un fichier de DirectoryIterator ...
213
-				spip_log("Methode $nom en echec sur " . get_class($this->iter));
212
+				spip_log("Methode $nom en echec sur ".get_class($this->iter));
214 213
 				spip_log("Cela peut être normal : retour d'une ligne de resultat ne pouvant pas calculer cette methode");
215 214
 
216 215
 				return '';
@@ -259,7 +258,7 @@  discard block
 block discarded – undo
259 258
 		// Creer la fonction de filtrage sur $this
260 259
 		if ($this->filtre) {
261 260
 			if ($filtres = $this->assembler_filtres($this->filtre)) {
262
-				$filtres = 'return ' . $filtres . ';';
261
+				$filtres = 'return '.$filtres.';';
263 262
 				$this->func_filtre = fn() => eval($filtres);
264 263
 			}
265 264
 			else {
@@ -294,7 +293,7 @@  discard block
 block discarded – undo
294 293
 			return null;
295 294
 		}
296 295
 
297
-		return '(' . implode(") $operateur (", $filtres_string) . ')';
296
+		return '('.implode(") $operateur (", $filtres_string).')';
298 297
 	}
299 298
 
300 299
 	/**
@@ -375,7 +374,7 @@  discard block
 block discarded – undo
375 374
 			return $this->composer_filtre($v[1], $v[0], $v[2]);
376 375
 		}
377 376
 
378
-		return null;  // sera ignore
377
+		return null; // sera ignore
379 378
 	}
380 379
 
381 380
 	/**
@@ -401,28 +400,28 @@  discard block
 block discarded – undo
401 400
 		# if (!in_array($cle, array('cle', 'valeur')))
402 401
 		#	return;
403 402
 
404
-		$a = '$this->get_select(\'' . $cle . '\')';
403
+		$a = '$this->get_select(\''.$cle.'\')';
405 404
 
406 405
 		$filtre = '';
407 406
 
408 407
 		if ($op == 'REGEXP') {
409
-			$filtre = 'filtrer("match", ' . $a . ', ' . str_replace('\"', '"', $valeur) . ')';
408
+			$filtre = 'filtrer("match", '.$a.', '.str_replace('\"', '"', $valeur).')';
410 409
 			$op = '';
411 410
 		} else {
412 411
 			if ($op == 'LIKE') {
413 412
 				$valeur = str_replace(['\"', '_', '%'], ['"', '.', '.*'], preg_quote($valeur));
414
-				$filtre = 'filtrer("match", ' . $a . ', ' . $valeur . ')';
413
+				$filtre = 'filtrer("match", '.$a.', '.$valeur.')';
415 414
 				$op = '';
416 415
 			} else {
417 416
 				if ($op == '=') {
418 417
 					$op = '==';
419 418
 				} else {
420 419
 					if ($op == 'IN') {
421
-						$filtre = 'in_array(' . $a . ', array' . $valeur . ')';
420
+						$filtre = 'in_array('.$a.', array'.$valeur.')';
422 421
 						$op = '';
423 422
 					} else {
424 423
 						if (!in_array($op, ['<', '<=', '>', '>='])) {
425
-							spip_log('operateur non reconnu ' . $op); // [todo] mettre une erreur de squelette
424
+							spip_log('operateur non reconnu '.$op); // [todo] mettre une erreur de squelette
426 425
 							$op = '';
427 426
 						}
428 427
 					}
@@ -431,7 +430,7 @@  discard block
 block discarded – undo
431 430
 		}
432 431
 
433 432
 		if ($op) {
434
-			$filtre = $a . $op . str_replace('\"', '"', $valeur);
433
+			$filtre = $a.$op.str_replace('\"', '"', $valeur);
435 434
 		}
436 435
 
437 436
 		if ($not) {
Please login to merge, or discard this patch.
ecrire/public/quete.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	return sql_getfetsel(
37 37
 		'virtuel',
38 38
 		'spip_articles',
39
-		['id_article=' . intval($id_article), "statut='publie'"],
39
+		['id_article='.intval($id_article), "statut='publie'"],
40 40
 		'',
41 41
 		'',
42 42
 		'',
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$cache_quete[$connect][$table][$id] = sql_fetsel(
82 82
 				$cache_quete[$connect][$table]['_select'],
83 83
 				$table,
84
-				$cache_quete[$connect][$table]['_id'] . '=' . intval($id),
84
+				$cache_quete[$connect][$table]['_id'].'='.intval($id),
85 85
 				'',
86 86
 				'',
87 87
 				'',
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	return
174 174
 		(isset($GLOBALS['meta']['date_prochain_postdate'])
175 175
 			and $GLOBALS['meta']['date_prochain_postdate'] > time())
176
-			? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
176
+			? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur)
177 177
 			: '1=1';
178 178
 }
179 179
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 				and $id_table = reset($objet)
233 233
 				and $objet = objet_type($id_table)
234 234
 			) {
235
-				$w = "$mstatut<>" . sql_quote($v);
235
+				$w = "$mstatut<>".sql_quote($v);
236 236
 
237 237
 				// retrouver l’id_auteur qui a filé un lien de prévisu éventuellement,
238 238
 				// sinon l’auteur en session
@@ -246,22 +246,22 @@  discard block
 block discarded – undo
246 246
 				}
247 247
 
248 248
 				// dans ce cas (admin en general), pas de filtrage sur ce statut
249
-				if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) {
249
+				if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) {
250 250
 					// si pas d'auteur identifie pas de sous-requete car pas d'article qui matche
251 251
 					if (!$id_auteur) {
252 252
 						$where[] = $w;
253 253
 					} else {
254 254
 						$primary = id_table_objet($objet);
255
-						$where[] = "($w OR $id_table.$primary IN (" . sql_get_select(
255
+						$where[] = "($w OR $id_table.$primary IN (".sql_get_select(
256 256
 							'ssss.id_objet',
257 257
 							'spip_auteurs_liens AS ssss',
258
-							'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur),
258
+							'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.intval($id_auteur),
259 259
 							'',
260 260
 							'',
261 261
 							'',
262 262
 							'',
263 263
 							$serveur
264
-						) . '))';
264
+						).'))';
265 265
 					}
266 266
 				}
267 267
 			} // ignorer ce statut si on ne sait pas comment le filtrer
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
  * @return array|bool|null
300 300
  */
301 301
 function quete_fichier($id_document, $serveur = '') {
302
-	return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
302
+	return sql_getfetsel('fichier', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur);
303 303
 }
304 304
 
305 305
 /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
  * @return array|bool
311 311
  */
312 312
 function quete_document($id_document, $serveur = '') {
313
-	return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur);
313
+	return sql_fetsel('*', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur);
314 314
 }
315 315
 
316 316
 /**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
  * @return array|bool|null
322 322
  */
323 323
 function quete_meta($nom, $serveur) {
324
-	return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur);
324
+	return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur);
325 325
 }
326 326
 
327 327
 /**
@@ -377,9 +377,9 @@  discard block
 block discarded – undo
377 377
 				// qui permet de distinguer le changement de logo
378 378
 				// et placer un expire sur le dossier IMG/
379 379
 				$res = [
380
-					$on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
-					($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
-					(!$taille ? '' : (' ' . $taille[3]))
380
+					$on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''),
381
+					($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''),
382
+					(!$taille ? '' : (' '.$taille[3]))
383 383
 				];
384 384
 				$res['src'] = $res[0];
385 385
 				$res['logo_on'] = $res[0];
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 	if (
477 477
 		strcmp($logo, _DIR_PLUGINS) == 0
478 478
 		or strcmp($logo, _DIR_PLUGINS_DIST) == 0
479
-		or strcmp($logo, _DIR_RACINE . 'prive/') == 0
479
+		or strcmp($logo, _DIR_RACINE.'prive/') == 0
480 480
 	) {
481 481
 		return $logo;
482 482
 	}
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 				$exposer[$m][$type][$principal] = true;
647 647
 				if ($type == 'id_mot') {
648 648
 					if (!$parent) {
649
-						$parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect);
649
+						$parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.intval($principal), '', '', '', '', $connect);
650 650
 					}
651 651
 					if ($parent) {
652 652
 						$exposer[$m]['id_groupe'][$parent] = true;
Please login to merge, or discard this patch.
ecrire/public/format_html.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -31,36 +31,36 @@  discard block
 block discarded – undo
31 31
 
32 32
 function format_inclure_html($file, $args, $prof) {
33 33
 	if (strpos($file, '#') === false) {
34
-		$t = $file ? ('(' . $file . ')') : '';
34
+		$t = $file ? ('('.$file.')') : '';
35 35
 	} else {
36
-		$t = '{fond=' . $file . '}';
36
+		$t = '{fond='.$file.'}';
37 37
 	}
38
-	$args = !$args ? '' : ('{' . join(', ', $args) . '}');
38
+	$args = !$args ? '' : ('{'.join(', ', $args).'}');
39 39
 
40
-	return ('<INCLURE' . $t . $args . '>');
40
+	return ('<INCLURE'.$t.$args.'>');
41 41
 }
42 42
 
43 43
 function format_polyglotte_html($args, $prof) {
44 44
 	$contenu = [];
45 45
 	foreach ($args as $l => $t) {
46
-		$contenu[] = ($l ? "[$l]" : '') . $t;
46
+		$contenu[] = ($l ? "[$l]" : '').$t;
47 47
 	}
48 48
 
49
-	return ('<multi>' . join(' ', $contenu) . '</multi>');
49
+	return ('<multi>'.join(' ', $contenu).'</multi>');
50 50
 }
51 51
 
52 52
 function format_idiome_html($nom, $module, $args, $filtres, $prof) {
53 53
 	foreach ($args as $k => $v) {
54 54
 		$args[$k] = "$k=$v";
55 55
 	}
56
-	$args = (!$args ? '' : ('{' . join(',', $args) . '}'));
56
+	$args = (!$args ? '' : ('{'.join(',', $args).'}'));
57 57
 
58
-	return ('<:' . ($module ? "$module:" : '') . $nom . $args . $filtres . ':>');
58
+	return ('<:'.($module ? "$module:" : '').$nom.$args.$filtres.':>');
59 59
 }
60 60
 
61 61
 function format_champ_html($nom, $boucle, $etoile, $avant, $apres, $args, $filtres, $prof) {
62 62
 	$nom = '#'
63
-		. ($boucle ? ($boucle . ':') : '')
63
+		. ($boucle ? ($boucle.':') : '')
64 64
 		. $nom
65 65
 		. $etoile
66 66
 		. $args
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
 		$critere[$k] = $crit_s;
91 91
 	}
92 92
 
93
-	return (!$critere ? '' : ('{' . join(',', $critere) . '}'));
93
+	return (!$critere ? '' : ('{'.join(',', $critere).'}'));
94 94
 }
95 95
 
96 96
 function format_liste_html($fonc, $args, $prof) {
97 97
 	return ((($fonc !== '') ? "|$fonc" : $fonc)
98
-		. (!$args ? '' : ('{' . join(',', $args) . '}')));
98
+		. (!$args ? '' : ('{'.join(',', $args).'}')));
99 99
 }
100 100
 
101 101
 // Concatenation sans separateur: verifier qu'on ne cree pas de faux lexemes
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			// si un texte se termine par ( et est suivi d'un champ
112 112
 			// ou assimiles, forcer la notation pleine
113 113
 			if ($c1 == '(' and substr($texte2, 0, 1) == '#') {
114
-				$args[$i + 1][0] = '[(' . $texte2 . ')]';
114
+				$args[$i + 1][0] = '[('.$texte2.')]';
115 115
 			}
116 116
 		} else {
117 117
 			if ($type == 'texte') {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 				($c1 == '}' and substr(ltrim($texte2), 0, 1) == '|')
125 125
 				or (preg_match('/[\w\d_*]/', $c1) and preg_match('/^[\w\d_*{|]/', $texte2))
126 126
 			) {
127
-				$args[$i][0] = '[(' . $texte . ')]';
127
+				$args[$i][0] = '[('.$texte.')]';
128 128
 			}
129 129
 		}
130 130
 	}
Please login to merge, or discard this patch.
ecrire/public/parametrer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	} else {
81 81
 		// Preparer l'appel de la fonction principale du squelette
82 82
 
83
-		spip_timer($a = 'calcul page ' . random_int(0, 1000));
83
+		spip_timer($a = 'calcul page '.random_int(0, 1000));
84 84
 
85 85
 		// On cree un marqueur de notes unique lie a cette composition
86 86
 		// et on enregistre l'etat courant des globales de notes...
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 		try {
113 113
 			$page = $fonc(['cache' => $cache], [$contexte]);
114 114
 		} catch (Throwable $e) {
115
-			$msg = _T('zbug_erreur_execution_page') . " $sourcefile";
116
-			$full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage();
115
+			$msg = _T('zbug_erreur_execution_page')." $sourcefile";
116
+			$full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage();
117 117
 			$full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg);
118 118
 			$corps = "<pre>$msg</pre>";
119 119
 			$page = analyse_resultat_skel($fond, ['cache' => $cache], $corps, $sourcefile);
@@ -144,17 +144,17 @@  discard block
 block discarded – undo
144 144
 
145 145
 		$profile = spip_timer($a);
146 146
 		spip_log("calcul ($profile) [$skel] $infos"
147
-			. ' (' . strlen($page['texte']) . ' octets)');
147
+			. ' ('.strlen($page['texte']).' octets)');
148 148
 
149 149
 		if (defined('_CALCUL_PROFILER') and intval($profile) > _CALCUL_PROFILER) {
150 150
 			spip_log("calcul ($profile) [$skel] $infos"
151
-				. ' (' . strlen($page['texte']) . ' octets) | ' . $_SERVER['REQUEST_URI'], 'profiler' . _LOG_AVERTISSEMENT);
151
+				. ' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], 'profiler'._LOG_AVERTISSEMENT);
152 152
 		}
153 153
 
154 154
 		if ($debug) {
155 155
 			// si c'est ce que demande le debusqueur, lui passer la main
156 156
 			$t = strlen($page['texte']) ? $page['texte'] : ' ';
157
-			$GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t;
157
+			$GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t;
158 158
 			$GLOBALS['debug_objets']['courant'] = $courant;
159 159
 			$GLOBALS['debug_objets']['profile'][$sourcefile] = $profile;
160 160
 			if (
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		if (defined('_VAR_INCLURE') and _VAR_INCLURE) {
186 186
 			$page['sourcefile'] = $sourcefile;
187 187
 			$page['texte'] =
188
-				"<div class='inclure_blocs'><h6>" . $page['sourcefile'] . '</h6>' . $page['texte'] . '</div>'
188
+				"<div class='inclure_blocs'><h6>".$page['sourcefile'].'</h6>'.$page['texte'].'</div>'
189 189
 				. ($js_inclus ? '' : "<script type='text/javascript'>jQuery(function(){jQuery('.inclure_blocs > h6:first-child').hover(function(){jQuery(this).parent().addClass('hover')},function(){jQuery(this).parent().removeClass('hover')})});</script>");
190 190
 			$js_inclus = true;
191 191
 		}
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
 			$val = '';
223 223
 		} elseif (is_array($val)) {
224 224
 			if ($profondeur_max > 0) {
225
-				$val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')';
225
+				$val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')';
226 226
 			} else {
227
-				$val = 'array:' . count($val);
227
+				$val = 'array:'.count($val);
228 228
 			}
229 229
 		} elseif (is_object($val)) {
230 230
 			$val = get_class($val);
231 231
 		} elseif (strlen("$val") > 30) {
232
-			$val = substr("$val", 0, 29) . '…';
232
+			$val = substr("$val", 0, 29).'…';
233 233
 			if (strstr($val, ' ')) {
234 234
 				$val = "'$val'";
235 235
 			}
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 		} elseif (!strlen($val)) {
239 239
 			$val = "''";
240 240
 		}
241
-		$infos[] = $var . '=' . $val;
241
+		$infos[] = $var.'='.$val;
242 242
 	}
243 243
 	return join(', ', $infos);
244 244
 }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 						. "?php include_spip('inc/headers');redirige_par_entete('"
307 307
 						. texte_script($url)
308 308
 						. "','',$status);"
309
-						. '?' . '>',
309
+						. '?'.'>',
310 310
 					'process_ins' => 'php',
311 311
 					'status' => $status
312 312
 				];
Please login to merge, or discard this patch.
ecrire/public/references.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	$select = true
125 125
 ) {
126 126
 	if (!is_string($defaut)) {
127
-		$defaut = '($Pile[0][\'' . strtolower($nom_champ) . '\'] ?? null)';
127
+		$defaut = '($Pile[0][\''.strtolower($nom_champ).'\'] ?? null)';
128 128
 	}
129 129
 
130 130
 	$idb_origine = $idb;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			}
158 158
 			// renseigner la boucle source de ce champ pour les traitements
159 159
 			$boucles[$idb_origine]->index_champ[$nom_champ_origine] = $idb;
160
-			$champ = '$Pile[$SP' . ($i ? "-$i" : '') . '][\'' . $c . '\']';
160
+			$champ = '$Pile[$SP'.($i ? "-$i" : '').'][\''.$c.'\']';
161 161
 			if (!$joker) {
162 162
 				return index_compose($conditionnel, $champ);
163 163
 			}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 function index_compose($conditionnel, $defaut) {
199 199
 	while ($c = array_pop($conditionnel)) {
200 200
 		// si on passe defaut = '', ne pas générer d'erreur de compilation.
201
-		$defaut = "($c:(" . ($defaut ?: "''") . '))';
201
+		$defaut = "($c:(".($defaut ?: "''").'))';
202 202
 	}
203 203
 
204 204
 	return $defaut;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	if (!$r) {
246 246
 		$joker = false; // indiquer a l'appelant
247 247
 		# continuer pour chercher l'erreur suivante
248
-		return ["'#" . $r . ':' . $nom_champ . "'", ''];
248
+		return ["'#".$r.':'.$nom_champ."'", ''];
249 249
 	}
250 250
 
251 251
 	$desc = $boucles[$idb]->show;
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
 			$t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep);
349 349
 		}
350 350
 		if ($t == null) {
351
-			[$e, $x] = $excep;  #PHP4 affecte de gauche a droite
352
-			$excep = $x;    #PHP5 de droite a gauche !
351
+			[$e, $x] = $excep; #PHP4 affecte de gauche a droite
352
+			$excep = $x; #PHP5 de droite a gauche !
353 353
 			$j = $trouver_table($e, $boucle->sql_serveur);
354 354
 			if (!$j) {
355 355
 				return ['', ''];
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 					$l = (preg_split('/\s*,\s*/', $k));
362 362
 					$k = $desc['key']['PRIMARY KEY'];
363 363
 					if (!in_array($k, $l)) {
364
-						spip_log("jointure impossible $e " . join(',', $l));
364
+						spip_log("jointure impossible $e ".join(',', $l));
365 365
 
366 366
 						return ['', ''];
367 367
 					}
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	// demander a SQL de gerer le synonyme
378 378
 	// ca permet que excep soit dynamique (Cedric, 2/3/06)
379 379
 	if ($excep != $nom_champ) {
380
-		$excep .= ' AS ' . $nom_champ;
380
+		$excep .= ' AS '.$nom_champ;
381 381
 	}
382 382
 
383 383
 	return ["$t.$excep", $nom_champ];
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
 		join(',', $collecte),
612 612
 		($collecte ? $param : substr($param, 1)), # virer la virgule
613 613
 		memoriser_contexte_compil($p),
614
-		(!$supp ? '' : (', ' . join(',', $supp)))
614
+		(!$supp ? '' : (', '.join(',', $supp)))
615 615
 	);
616 616
 
617 617
 	$p->interdire_scripts = false;
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 	$nom = $p->id_boucle;
710 710
 
711 711
 	if ($nom and trouver_nom_serveur_distant($p)) {
712
-		spip_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit'));
712
+		spip_log($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit'));
713 713
 
714 714
 		return false;
715 715
 	}
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 			(strpos($ps, 'typo') !== false)
796 796
 		)
797 797
 	) {
798
-		$ps = 'traiter_doublons_documents($doublons, ' . $ps . ')';
798
+		$ps = 'traiter_doublons_documents($doublons, '.$ps.')';
799 799
 	}
800 800
 
801 801
 	// La protection des champs par |safehtml est assuree par les extensions
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 function compose_filtres_args($p, $args, $sep) {
917 917
 	$arglist = '';
918 918
 	foreach ($args as $arg) {
919
-		$arglist .= $sep .
919
+		$arglist .= $sep.
920 920
 			calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle);
921 921
 	}
922 922
 
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
 	while ($b != '') {
968 968
 		foreach ($p->boucles[$b]->criteres as $critere) {
969 969
 			if ($critere->op == $motif) {
970
-				$p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") .
970
+				$p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n").
971 971
 					"]['$champ']";
972 972
 				$b = '';
973 973
 				break 2;
@@ -995,6 +995,6 @@  discard block
 block discarded – undo
995 995
  */
996 996
 function zbug_presenter_champ($p, $champ = '') {
997 997
 	$balise = $champ ?: $p->nom_champ;
998
-	$explicite = $p->nom_boucle ? $p->nom_boucle . ':' : '';
998
+	$explicite = $p->nom_boucle ? $p->nom_boucle.':' : '';
999 999
 	return "#{$explicite}{$balise}";
1000 1000
 }
Please login to merge, or discard this patch.
ecrire/public/tracer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 
112 112
 function chrono_requete($temps) {
113 113
 	$total = 0;
114
-	$hors = '<i>' . _T('zbug_hors_compilation') . '</i>';
114
+	$hors = '<i>'._T('zbug_hors_compilation').'</i>';
115 115
 	$t = $q = $n = $d = [];
116 116
 	// Totaliser les temps et completer le Explain
117 117
 	foreach ($temps as $key => $v) {
118 118
 		[$dt, $nb, $boucle, $query, $explain, $res, $contexte] = $v;
119 119
 		if (is_array($contexte)) {
120
-			$k = ($contexte[0] . " $boucle");
120
+			$k = ($contexte[0]." $boucle");
121 121
 			include_spip('public/compiler');
122 122
 			$env = reconstruire_contexte_compil($contexte);
123 123
 		} else {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	// Fabriquer les liens de navigations dans le tableau des temps
163 163
 	foreach ($temps as $k => $v) {
164 164
 		$titre = strip_tags($v[2]);
165
-		$href = quote_amp($GLOBALS['REQUEST_URI']) . "#req$i";
165
+		$href = quote_amp($GLOBALS['REQUEST_URI'])."#req$i";
166 166
 		$href = str_replace("\\'", '&#39;', $href);
167 167
 
168 168
 		if (!isset($t[$v[2]])) {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	unset($d['']);
184 184
 	// Fabriquer le tableau des liens de navigation dans le grand tableau
185 185
 	foreach ($d as $k => $v) {
186
-		$d[$k] = $n[$k] . "</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>"
186
+		$d[$k] = $n[$k]."</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>"
187 187
 			. join('', $t[$k]);
188 188
 	}
189 189
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		. join("</td></tr>\n<tr><td>", $d)
194 194
 		. "</td></tr>\n"
195 195
 		. (# _request('var_mode_objet') ? '' :
196
-		('<tr><td>' . (is_countable($temps) ? count($temps) : 0) . '</td><td>' . _T('info_total') . '</td><td class="time">' . $total . '</td><td></td></tr>'))
196
+		('<tr><td>'.(is_countable($temps) ? count($temps) : 0).'</td><td>'._T('info_total').'</td><td class="time">'.$total.'</td><td></td></tr>'))
197 197
 	];
198 198
 
199 199
 	return [$temps, $navigation];
Please login to merge, or discard this patch.
ecrire/inc_version.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
 define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../');
52 52
 
53 53
 /** chemin absolu vers la racine */
54
-define('_ROOT_RACINE', dirname(__DIR__) . '/');
54
+define('_ROOT_RACINE', dirname(__DIR__).'/');
55 55
 /** chemin absolu vers le repertoire de travail */
56
-define('_ROOT_CWD', getcwd() . '/');
56
+define('_ROOT_CWD', getcwd().'/');
57 57
 /** chemin absolu vers ecrire */
58
-define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT);
58
+define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT);
59 59
 
60 60
 // Icones
61 61
 if (!defined('_NOM_IMG_PACK')) {
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 	define('_NOM_IMG_PACK', 'images/');
64 64
 }
65 65
 /** le chemin http (relatif) vers les images standard */
66
-define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK));
66
+define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK));
67 67
 
68 68
 /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */
69
-define('_ROOT_IMG_PACK', dirname(__DIR__) . '/prive/' . _NOM_IMG_PACK);
69
+define('_ROOT_IMG_PACK', dirname(__DIR__).'/prive/'._NOM_IMG_PACK);
70 70
 
71 71
 if (!defined('_JAVASCRIPT')) {
72 72
 	/** Nom du repertoire des  bibliotheques JavaScript */
73 73
 	define('_JAVASCRIPT', 'javascript/');
74 74
 } // utilisable avec #CHEMIN et find_in_path
75 75
 /** le nom du repertoire des  bibliotheques JavaScript du prive */
76
-define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT));
76
+define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT));
77 77
 
78 78
 # Le nom des 4 repertoires modifiables par les scripts lances par httpd
79 79
 # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas)
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
 // Son emplacement absolu si on le trouve
106 106
 if (
107
-	@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')
108
-	or (@file_exists($f = _ROOT_RESTREINT . _NOM_CONFIG . '.php'))
107
+	@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')
108
+	or (@file_exists($f = _ROOT_RESTREINT._NOM_CONFIG.'.php'))
109 109
 ) {
110 110
 	/** Emplacement absolu du fichier d'option */
111 111
 	define('_FILE_OPTIONS', $f);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 // Inclure l'ecran de securite
130 130
 if (
131 131
 	!defined('_ECRAN_SECURITE')
132
-	and @file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . 'ecran_securite.php')
132
+	and @file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES.'ecran_securite.php')
133 133
 ) {
134 134
 	include $f;
135 135
 }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			// UA plus cibles
151 151
 			. '80legs|accoona|AltaVista|ASPSeek|Baidu|Charlotte|EC2LinkFinder|eStyle|facebook|flipboard|hootsuite|FunWebProducts|Google|Genieo|INA dlweb|InfegyAtlas|Java VM|LiteFinder|Lycos|MetaURI|Moreover|Rambler|Scooter|ScrubbyBloglines|Yahoo|Yeti'
152 152
 			. ',i',
153
-			(string)$_SERVER['HTTP_USER_AGENT']
153
+			(string) $_SERVER['HTTP_USER_AGENT']
154 154
 		)
155 155
 	);
156 156
 }
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 # la matrice standard (fichiers definissant les fonctions a inclure)
393 393
 $spip_matrice = [];
394 394
 # les plugins a activer
395
-$plugins = [];  // voir le contenu du repertoire /plugins/
395
+$plugins = []; // voir le contenu du repertoire /plugins/
396 396
 # les surcharges de include_spip()
397 397
 $surcharges = []; // format 'inc_truc' => '/plugins/chose/inc_truc2.php'
398 398
 
@@ -470,8 +470,8 @@  discard block
 block discarded – undo
470 470
 //
471 471
 // Charger les fonctions liees aux serveurs Http et Sql.
472 472
 //
473
-require_once _ROOT_RESTREINT . 'inc/utils.php';
474
-require_once _ROOT_RESTREINT . 'base/connect_sql.php';
473
+require_once _ROOT_RESTREINT.'inc/utils.php';
474
+require_once _ROOT_RESTREINT.'base/connect_sql.php';
475 475
 
476 476
 // Definition personnelles eventuelles
477 477
 
@@ -494,10 +494,10 @@  discard block
 block discarded – undo
494 494
 // ===> on execute en neutralisant les messages d'erreur
495 495
 
496 496
 spip_initialisation_core(
497
-	(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
498
-	(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
499
-	(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
500
-	(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
497
+	(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
498
+	(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
499
+	(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
500
+	(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
501 501
 );
502 502
 
503 503
 
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 		// Si on est dans le site public, dire que qq s'en occupe
553 553
 		include_spip('inc/minipres');
554 554
 		utiliser_langue_visiteur();
555
-		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>" . _T('info_travaux_texte') . '</p>', ['status' => 503]);
555
+		echo minipres(_T('info_travaux_titre'), "<p style='text-align: center;'>"._T('info_travaux_texte').'</p>', ['status' => 503]);
556 556
 		exit;
557 557
 	}
558 558
 	// autrement c'est une install ad hoc (spikini...), on sait pas faire
@@ -591,12 +591,12 @@  discard block
 block discarded – undo
591 591
 	}
592 592
 	if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) {
593 593
 		include_spip('inc/filtres_mini');
594
-		header(_HEADER_COMPOSED_BY . " $spip_version_affichee @ www.spip.net + " . url_absolue(_DIR_VAR . 'config.txt'));
594
+		header(_HEADER_COMPOSED_BY." $spip_version_affichee @ www.spip.net + ".url_absolue(_DIR_VAR.'config.txt'));
595 595
 	} else {
596 596
 		// header minimal
597
-		header(_HEADER_COMPOSED_BY . ' @ www.spip.net');
597
+		header(_HEADER_COMPOSED_BY.' @ www.spip.net');
598 598
 	}
599 599
 }
600 600
 
601 601
 $methode = ($_SERVER['REQUEST_METHOD'] ?? ((php_sapi_name() == 'cli') ? 'cli' : ''));
602
-spip_log($methode . ' ' . self() . ' - ' . _FILE_CONNECT, _LOG_DEBUG);
602
+spip_log($methode.' '.self().' - '._FILE_CONNECT, _LOG_DEBUG);
Please login to merge, or discard this patch.