Completed
Push — master ( 20b549...62b76e )
by cam
04:16
created
ecrire/inc/filtres.php 1 patch
Spacing   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 		return $f;
94 94
 	}
95
-	foreach (array('filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc) as $f) {
95
+	foreach (array('filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc) as $f) {
96 96
 		trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels
97 97
 		// fonction ou name\space\fonction
98 98
 		if (is_callable($f)) {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 function spip_version() {
160 160
 	$version = $GLOBALS['spip_version_affichee'];
161 161
 	if ($svn_revision = version_svn_courante(_DIR_RACINE)) {
162
-		$version .= ($svn_revision < 0 ? ' SVN' : '') . ' [' . abs($svn_revision) . ']';
162
+		$version .= ($svn_revision < 0 ? ' SVN' : '').' ['.abs($svn_revision).']';
163 163
 	}
164 164
 
165 165
 	return $version;
@@ -186,15 +186,15 @@  discard block
 block discarded – undo
186 186
 	}
187 187
 
188 188
 	// version installee par paquet ZIP
189
-	if (lire_fichier($dir . '/svn.revision', $c)
189
+	if (lire_fichier($dir.'/svn.revision', $c)
190 190
 		and preg_match(',Revision: (\d+),', $c, $d)
191 191
 	) {
192 192
 		return intval($d[1]);
193 193
 	}
194 194
 
195 195
 	// version installee par SVN
196
-	if (file_exists($dir . '/.svn/wc.db') && class_exists('SQLite3')) {
197
-		$db = new SQLite3($dir . '/.svn/wc.db');
196
+	if (file_exists($dir.'/.svn/wc.db') && class_exists('SQLite3')) {
197
+		$db = new SQLite3($dir.'/.svn/wc.db');
198 198
 		$result = $db->query('SELECT changed_revision FROM nodes WHERE local_relpath = "" LIMIT 1');
199 199
 		if ($result) {
200 200
 			$row = $result->fetchArray();
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 				return -$row['changed_revision'];
203 203
 			}
204 204
 		}
205
-	} else if (lire_fichier($dir . '/.svn/entries', $c)
205
+	} else if (lire_fichier($dir.'/.svn/entries', $c)
206 206
 		and (
207 207
 			(preg_match_all(
208 208
 					',committed-rev="([0-9]+)",', $c, $r1, PREG_PATTERN_ORDER)
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
 
223 223
 // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images
224 224
 // et laisser passer les fonctions personnelles baptisees image_...
225
-$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php';
226
-$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
227
-$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php';
228
-$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
229
-$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php';
225
+$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php';
226
+$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php';
227
+$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php';
228
+$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php';
229
+$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php';
230 230
 
231 231
 $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php';
232 232
 $GLOBALS['spip_matrice']['couleur_foncer'] = 'inc/filtres_images_mini.php';
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
  */
373 373
 function filtre_debug($val, $key = null) {
374 374
 	$debug = (
375
-		is_null($key) ? '' : (var_export($key, true) . " = ")
376
-		) . var_export($val, true);
375
+		is_null($key) ? '' : (var_export($key, true)." = ")
376
+		).var_export($val, true);
377 377
 
378 378
 	include_spip('inc/autoriser');
379 379
 	if (autoriser('webmestre')) {
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 						if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) {
462 462
 							$srcover = $match[1];
463 463
 							array_shift($args);
464
-							array_unshift($args, "<img src='" . $match[1] . "' />");
464
+							array_unshift($args, "<img src='".$match[1]."' />");
465 465
 							$srcover_filter = call_user_func_array($filtre, $args);
466 466
 							$srcover_filter = extraire_attribut($srcover_filter, 'src');
467 467
 							$reduit = str_replace($srcover, $srcover_filter, $reduit);
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 	// " -> &quot; et tout ce genre de choses
812 812
 	$u = $GLOBALS['meta']['pcre_u'];
813 813
 	$texte = str_replace("&nbsp;", " ", $texte);
814
-	$texte = preg_replace('/\s{2,}/S' . $u, " ", $texte);
814
+	$texte = preg_replace('/\s{2,}/S'.$u, " ", $texte);
815 815
 	// ne pas echapper les sinqle quotes car certains outils de syndication gerent mal
816 816
 	$texte = entites_html($texte, false, false);
817 817
 	// mais bien echapper les double quotes !
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
  **/
872 872
 function supprimer_numero($texte) {
873 873
 	return preg_replace(
874
-		",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S",
874
+		",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S",
875 875
 		"", $texte);
876 876
 }
877 877
 
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
  **/
897 897
 function recuperer_numero($texte) {
898 898
 	if (preg_match(
899
-		",^[[:space:]]*([0-9]+)([.)]|" . chr(194) . '?' . chr(176) . ")[[:space:]]+,S",
899
+		",^[[:space:]]*([0-9]+)([.)]|".chr(194).'?'.chr(176).")[[:space:]]+,S",
900 900
 		$texte, $regs)) {
901 901
 		return strval($regs[1]);
902 902
 	} else {
@@ -981,8 +981,8 @@  discard block
 block discarded – undo
981 981
  **/
982 982
 function textebrut($texte) {
983 983
 	$u = $GLOBALS['meta']['pcre_u'];
984
-	$texte = preg_replace('/\s+/S' . $u, " ", $texte);
985
-	$texte = preg_replace("/<(p|br)( [^>]*)?" . ">/iS", "\n\n", $texte);
984
+	$texte = preg_replace('/\s+/S'.$u, " ", $texte);
985
+	$texte = preg_replace("/<(p|br)( [^>]*)?".">/iS", "\n\n", $texte);
986 986
 	$texte = preg_replace("/^\n+/", "", $texte);
987 987
 	$texte = preg_replace("/\n+$/", "", $texte);
988 988
 	$texte = preg_replace("/\n +/", "\n", $texte);
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
 	if (preg_match_all(",(<a\s+[^>]*https?://[^>]*class=[\"']spip_(out|url)\b[^>]+>),imsS",
1011 1011
 		$texte, $liens, PREG_PATTERN_ORDER)) {
1012 1012
 		foreach ($liens[0] as $a) {
1013
-			$rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel');
1013
+			$rel = 'noopener noreferrer '.extraire_attribut($a, 'rel');
1014 1014
 			$ablank = inserer_attribut($a, 'rel', $rel);
1015 1015
 			$ablank = inserer_attribut($ablank, 'target', '_blank');
1016 1016
 			$texte = str_replace($a, $ablank, $texte);
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 		foreach ($regs[0] as $a) {
1036 1036
 			$rel = extraire_attribut($a, "rel");
1037 1037
 			if (strpos($rel, "nofollow") === false) {
1038
-				$rel = "nofollow" . ($rel ? " $rel" : "");
1038
+				$rel = "nofollow".($rel ? " $rel" : "");
1039 1039
 				$anofollow = inserer_attribut($a, "rel", $rel);
1040 1040
 				$texte = str_replace($a, $anofollow, $texte);
1041 1041
 			}
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
 	$u = $GLOBALS['meta']['pcre_u'];
1065 1065
 	$texte = preg_replace("@</p>@iS", "\n", $texte);
1066 1066
 	$texte = preg_replace("@<p\b.*>@UiS", "<br />", $texte);
1067
-	$texte = preg_replace("@^\s*<br />@S" . $u, "", $texte);
1067
+	$texte = preg_replace("@^\s*<br />@S".$u, "", $texte);
1068 1068
 
1069 1069
 	return $texte;
1070 1070
 }
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
 		return $texte;
1095 1095
 	}
1096 1096
 	include_spip('inc/texte');
1097
-	$tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ?
1097
+	$tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ?
1098 1098
 		'div' : 'span';
1099 1099
 
1100 1100
 	return "<$tag style='word-wrap:break-word;'>$texte</$tag>";
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 function attribut_html($texte, $textebrut = true) {
1204 1204
 	$u = $GLOBALS['meta']['pcre_u'];
1205 1205
 	if ($textebrut) {
1206
-		$texte = preg_replace(array(",\n,", ",\s(?=\s),msS" . $u), array(" ", ""), textebrut($texte));
1206
+		$texte = preg_replace(array(",\n,", ",\s(?=\s),msS".$u), array(" ", ""), textebrut($texte));
1207 1207
 	}
1208 1208
 	$texte = texte_backend($texte);
1209 1209
 	$texte = str_replace(array("'", '"'), array('&#039;', '&#034;'), $texte);
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
 	# un message pour abs_url
1233 1233
 	$GLOBALS['mode_abs_url'] = 'url';
1234 1234
 	$url = trim($url);
1235
-	$r = ",^(?:" . _PROTOCOLES_STD . '):?/?/?$,iS';
1235
+	$r = ",^(?:"._PROTOCOLES_STD.'):?/?/?$,iS';
1236 1236
 
1237 1237
 	return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url);
1238 1238
 }
@@ -1434,14 +1434,14 @@  discard block
 block discarded – undo
1434 1434
 	if (strpos($texte, "<") !== false) {
1435 1435
 		include_spip('inc/lien');
1436 1436
 		if (defined('_PREG_MODELE')) {
1437
-			$preg_modeles = "@" . _PREG_MODELE . "@imsS";
1437
+			$preg_modeles = "@"._PREG_MODELE."@imsS";
1438 1438
 			$texte = echappe_html($texte, '', true, $preg_modeles);
1439 1439
 		}
1440 1440
 	}
1441 1441
 
1442 1442
 	$debut = '';
1443 1443
 	$suite = $texte;
1444
-	while ($t = strpos('-' . $suite, "\n", 1)) {
1444
+	while ($t = strpos('-'.$suite, "\n", 1)) {
1445 1445
 		$debut .= substr($suite, 0, $t - 1);
1446 1446
 		$suite = substr($suite, $t);
1447 1447
 		$car = substr($suite, 0, 1);
@@ -1458,11 +1458,11 @@  discard block
 block discarded – undo
1458 1458
 			$suite = substr($suite, strlen($regs[0]));
1459 1459
 		}
1460 1460
 	}
1461
-	$texte = $debut . $suite;
1461
+	$texte = $debut.$suite;
1462 1462
 
1463 1463
 	$texte = echappe_retour($texte);
1464 1464
 
1465
-	return $texte . $fin;
1465
+	return $texte.$fin;
1466 1466
 }
1467 1467
 
1468 1468
 
@@ -1523,7 +1523,7 @@  discard block
 block discarded – undo
1523 1523
 		}
1524 1524
 
1525 1525
 		foreach ($regs as $reg) {
1526
-			$cle = ($reg[1] ? $reg[1] . ':' : '') . $reg[2];
1526
+			$cle = ($reg[1] ? $reg[1].':' : '').$reg[2];
1527 1527
 			$desc = $traduire($cle, $lang, true);
1528 1528
 			$l = $desc->langue;
1529 1529
 			// si pas de traduction, on laissera l'écriture de l'idiome entier dans le texte.
@@ -1636,7 +1636,7 @@  discard block
 block discarded – undo
1636 1636
 					// il ne faut pas echapper en div si propre produit un seul paragraphe
1637 1637
 					include_spip('inc/texte');
1638 1638
 					$trad_propre = preg_replace(",(^<p[^>]*>|</p>$),Uims", "", propre($trad));
1639
-					$mode = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $trad_propre) ? 'div' : 'span';
1639
+					$mode = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $trad_propre) ? 'div' : 'span';
1640 1640
 					$trad = code_echappement($trad, 'multi', false, $mode);
1641 1641
 					$trad = str_replace("'", '"', inserer_attribut($trad, 'lang', $l));
1642 1642
 					if (lang_dir($l) !== lang_dir($lang)) {
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
 	if (is_array($balise)) {
1830 1830
 		array_walk(
1831 1831
 			$balise,
1832
-			function(&$a, $key, $t){
1832
+			function(&$a, $key, $t) {
1833 1833
 				$a = extraire_attribut($a, $t);
1834 1834
 			},
1835 1835
 			$attribut
@@ -1916,14 +1916,14 @@  discard block
 block discarded – undo
1916 1916
 
1917 1917
 	if ($old !== null) {
1918 1918
 		// Remplacer l'ancien attribut du meme nom
1919
-		$balise = $r[1] . $insert . $r[5];
1919
+		$balise = $r[1].$insert.$r[5];
1920 1920
 	} else {
1921 1921
 		// preferer une balise " />" (comme <img />)
1922 1922
 		if (preg_match(',/>,', $balise)) {
1923
-			$balise = preg_replace(",\s?/>,S", $insert . " />", $balise, 1);
1923
+			$balise = preg_replace(",\s?/>,S", $insert." />", $balise, 1);
1924 1924
 		} // sinon une balise <a ...> ... </a>
1925 1925
 		else {
1926
-			$balise = preg_replace(",\s?>,S", $insert . ">", $balise, 1);
1926
+			$balise = preg_replace(",\s?>,S", $insert.">", $balise, 1);
1927 1927
 		}
1928 1928
 	}
1929 1929
 
@@ -1965,8 +1965,8 @@  discard block
 block discarded – undo
1965 1965
 //
1966 1966
 // Quelques fonctions de calcul arithmetique
1967 1967
 //
1968
-function floatstr($a) { return str_replace(',','.',(string)floatval($a)); }
1969
-function strize($f, $a, $b) { return floatstr($f(floatstr($a),floatstr($b))); }
1968
+function floatstr($a) { return str_replace(',', '.', (string) floatval($a)); }
1969
+function strize($f, $a, $b) { return floatstr($f(floatstr($a), floatstr($b))); }
1970 1970
 
1971 1971
 /**
1972 1972
  * Additionne 2 nombres
@@ -1986,7 +1986,7 @@  discard block
 block discarded – undo
1986 1986
 function plus($a, $b) {
1987 1987
 	return $a + $b;
1988 1988
 }
1989
-function strplus($a, $b) {return strize('plus', $a, $b);}
1989
+function strplus($a, $b) {return strize('plus', $a, $b); }
1990 1990
 /**
1991 1991
  * Soustrait 2 nombres
1992 1992
  *
@@ -2005,7 +2005,7 @@  discard block
 block discarded – undo
2005 2005
 function moins($a, $b) {
2006 2006
 	return $a - $b;
2007 2007
 }
2008
-function strmoins($a, $b) {return strize('moins', $a, $b);}
2008
+function strmoins($a, $b) {return strize('moins', $a, $b); }
2009 2009
 
2010 2010
 /**
2011 2011
  * Multiplie 2 nombres
@@ -2026,7 +2026,7 @@  discard block
 block discarded – undo
2026 2026
 function mult($a, $b) {
2027 2027
 	return $a * $b;
2028 2028
 }
2029
-function strmult($a, $b) {return strize('mult', $a, $b);}
2029
+function strmult($a, $b) {return strize('mult', $a, $b); }
2030 2030
 
2031 2031
 /**
2032 2032
  * Divise 2 nombres
@@ -2047,7 +2047,7 @@  discard block
 block discarded – undo
2047 2047
 function div($a, $b) {
2048 2048
 	return $b ? $a / $b : 0;
2049 2049
 }
2050
-function strdiv($a, $b) {return strize('div', $a, $b);}
2050
+function strdiv($a, $b) {return strize('div', $a, $b); }
2051 2051
 
2052 2052
 /**
2053 2053
  * Retourne le modulo 2 nombres
@@ -2088,13 +2088,13 @@  discard block
 block discarded – undo
2088 2088
 	if (!defined('_TAGS_NOM_AUTEUR')) {
2089 2089
 		define('_TAGS_NOM_AUTEUR', '');
2090 2090
 	}
2091
-	$tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR));
2091
+	$tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR));
2092 2092
 	foreach ($tags_acceptes as $tag) {
2093 2093
 		if (strlen($tag)) {
2094
-			$remp1[] = '<' . trim($tag) . '>';
2095
-			$remp1[] = '</' . trim($tag) . '>';
2096
-			$remp2[] = '\x60' . trim($tag) . '\x61';
2097
-			$remp2[] = '\x60/' . trim($tag) . '\x61';
2094
+			$remp1[] = '<'.trim($tag).'>';
2095
+			$remp1[] = '</'.trim($tag).'>';
2096
+			$remp2[] = '\x60'.trim($tag).'\x61';
2097
+			$remp2[] = '\x60/'.trim($tag).'\x61';
2098 2098
 		}
2099 2099
 	}
2100 2100
 	$v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom)));
@@ -2157,7 +2157,7 @@  discard block
 block discarded – undo
2157 2157
 			$s[] = preg_replace(',>[^<]+</a>,S',
2158 2158
 				'>'
2159 2159
 				. http_img_pack('attachment-16.png', $t,
2160
-					'title="' . attribut_html($t) . '"')
2160
+					'title="'.attribut_html($t).'"')
2161 2161
 				. '</a>', $tag);
2162 2162
 		}
2163 2163
 	}
@@ -2218,10 +2218,10 @@  discard block
 block discarded – undo
2218 2218
 	$fichier = basename($url);
2219 2219
 
2220 2220
 	return '<a rel="enclosure"'
2221
-	. ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '')
2222
-	. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2223
-	. ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '')
2224
-	. '>' . $fichier . '</a>';
2221
+	. ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '')
2222
+	. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2223
+	. ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '')
2224
+	. '>'.$fichier.'</a>';
2225 2225
 }
2226 2226
 
2227 2227
 /**
@@ -2249,9 +2249,9 @@  discard block
 block discarded – undo
2249 2249
 			} # vieux data
2250 2250
 			$fichier = basename($url);
2251 2251
 			$enclosures[] = '<enclosure'
2252
-				. ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '')
2253
-				. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2254
-				. ($length ? ' length="' . $length . '"' : '')
2252
+				. ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '')
2253
+				. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2254
+				. ($length ? ' length="'.$length.'"' : '')
2255 2255
 				. ' />';
2256 2256
 		}
2257 2257
 	}
@@ -2277,7 +2277,7 @@  discard block
 block discarded – undo
2277 2277
 		if (extraire_attribut($e, rel) == 'tag') {
2278 2278
 			$subjects .= '<dc:subject>'
2279 2279
 				. texte_backend(textebrut($e))
2280
-				. '</dc:subject>' . "\n";
2280
+				. '</dc:subject>'."\n";
2281 2281
 		}
2282 2282
 	}
2283 2283
 
@@ -2313,7 +2313,7 @@  discard block
 block discarded – undo
2313 2313
 	if (is_array($texte)) {
2314 2314
 		array_walk(
2315 2315
 			$texte,
2316
-			function(&$a, $key, $t){
2316
+			function(&$a, $key, $t) {
2317 2317
 				$a = extraire_balise($a, $t);
2318 2318
 			},
2319 2319
 			$tag
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
 	if (is_array($texte)) {
2358 2358
 		array_walk(
2359 2359
 			$texte,
2360
-			function(&$a, $key, $t){
2360
+			function(&$a, $key, $t) {
2361 2361
 				$a = extraire_balises($a, $t);
2362 2362
 			},
2363 2363
 			$tag
@@ -2483,7 +2483,7 @@  discard block
 block discarded – undo
2483 2483
 		if ($fond != '404') {
2484 2484
 			$contexte = array_shift($p);
2485 2485
 			$contexte['page'] = $fond;
2486
-			$action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action);
2486
+			$action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action);
2487 2487
 		}
2488 2488
 	}
2489 2489
 	// defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url
@@ -2538,9 +2538,9 @@  discard block
 block discarded – undo
2538 2538
 			. '"'
2539 2539
 			. (is_null($val)
2540 2540
 				? ''
2541
-				: ' value="' . entites_html($val) . '"'
2541
+				: ' value="'.entites_html($val).'"'
2542 2542
 			)
2543
-			. ' type="hidden"' . "\n/>";
2543
+			. ' type="hidden"'."\n/>";
2544 2544
 	}
2545 2545
 
2546 2546
 	return join("", $hidden);
@@ -2703,12 +2703,12 @@  discard block
 block discarded – undo
2703 2703
 	if ($pas < 1) {
2704 2704
 		return '';
2705 2705
 	}
2706
-	$ancre = 'pagination' . $nom; // #pagination_articles
2707
-	$debut = 'debut' . $nom; // 'debut_articles'
2706
+	$ancre = 'pagination'.$nom; // #pagination_articles
2707
+	$debut = 'debut'.$nom; // 'debut_articles'
2708 2708
 
2709 2709
 	// n'afficher l'ancre qu'une fois
2710 2710
 	if (!isset($ancres[$ancre])) {
2711
-		$bloc_ancre = $ancres[$ancre] = "<a name='" . $ancre . "' id='" . $ancre . "'></a>";
2711
+		$bloc_ancre = $ancres[$ancre] = "<a name='".$ancre."' id='".$ancre."'></a>";
2712 2712
 	} else {
2713 2713
 		$bloc_ancre = '';
2714 2714
 	}
@@ -2738,7 +2738,7 @@  discard block
 block discarded – undo
2738 2738
 	}
2739 2739
 
2740 2740
 	if ($modele) {
2741
-		$modele = '_' . $modele;
2741
+		$modele = '_'.$modele;
2742 2742
 	}
2743 2743
 
2744 2744
 	return recuperer_fond("modeles/pagination$modele", $pagination, array('trim' => true), $connect);
@@ -2763,7 +2763,7 @@  discard block
 block discarded – undo
2763 2763
 	return preg_replace_callback(
2764 2764
 		",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims",
2765 2765
 		function($x) use ($path) {
2766
-			return "url('" . suivre_lien($path, $x[1]) . "')";
2766
+			return "url('".suivre_lien($path, $x[1])."')";
2767 2767
 		},
2768 2768
 		$contenu
2769 2769
 	);
@@ -2825,14 +2825,14 @@  discard block
 block discarded – undo
2825 2825
 	) {
2826 2826
 		$distant = true;
2827 2827
 		$cssf = parse_url($css);
2828
-		$cssf = $cssf['path'] . ($cssf['query'] ? "?" . $cssf['query'] : "");
2828
+		$cssf = $cssf['path'].($cssf['query'] ? "?".$cssf['query'] : "");
2829 2829
 		$cssf = preg_replace(',[?:&=],', "_", $cssf);
2830 2830
 	} else {
2831 2831
 		$distant = false;
2832 2832
 		$cssf = $css;
2833 2833
 		// 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi
2834 2834
 		//propose (rien a faire dans ce cas)
2835
-		$f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css);
2835
+		$f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css);
2836 2836
 		if (@file_exists($f)) {
2837 2837
 			return $f;
2838 2838
 		}
@@ -2842,7 +2842,7 @@  discard block
 block discarded – undo
2842 2842
 	$dir_var = sous_repertoire(_DIR_VAR, 'cache-css');
2843 2843
 	$f = $dir_var
2844 2844
 		. preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf)
2845
-		. '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css';
2845
+		. '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css';
2846 2846
 
2847 2847
 	// la css peut etre distante (url absolue !)
2848 2848
 	if ($distant) {
@@ -2887,8 +2887,8 @@  discard block
 block discarded – undo
2887 2887
 		} // si la css_direction commence par $dir_var on la fait passer pour une absolue
2888 2888
 		elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) {
2889 2889
 			$css_direction = substr($css_direction, strlen($dir_var));
2890
-			$src_faux_abs["/@@@@@@/" . $css_direction] = $css_direction;
2891
-			$css_direction = "/@@@@@@/" . $css_direction;
2890
+			$src_faux_abs["/@@@@@@/".$css_direction] = $css_direction;
2891
+			$css_direction = "/@@@@@@/".$css_direction;
2892 2892
 		}
2893 2893
 		$src[] = $regs[0][$k];
2894 2894
 		$src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]);
@@ -2937,7 +2937,7 @@  discard block
 block discarded – undo
2937 2937
 
2938 2938
 	$f = basename($css, '.css');
2939 2939
 	$f = sous_repertoire(_DIR_VAR, 'cache-css')
2940
-		. preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f)
2940
+		. preg_replace(",(.*?)(_rtl|_ltr)?$,", "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f)
2941 2941
 		. '.css';
2942 2942
 
2943 2943
 	if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) {
@@ -2946,7 +2946,7 @@  discard block
 block discarded – undo
2946 2946
 
2947 2947
 	if ($url_absolue_css == $css) {
2948 2948
 		if (strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0
2949
-			or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu)
2949
+			or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu)
2950 2950
 		) {
2951 2951
 			include_spip('inc/distant');
2952 2952
 			if (!$contenu = recuperer_page($css)) {
@@ -3056,7 +3056,7 @@  discard block
 block discarded – undo
3056 3056
 	$expression = str_replace("\/", "/", $expression);
3057 3057
 	$expression = str_replace("/", "\/", $expression);
3058 3058
 
3059
-	if (preg_match('/' . $expression . '/' . $modif, $texte, $r)) {
3059
+	if (preg_match('/'.$expression.'/'.$modif, $texte, $r)) {
3060 3060
 		if (isset($r[$capte])) {
3061 3061
 			return $r[$capte];
3062 3062
 		} else {
@@ -3094,7 +3094,7 @@  discard block
 block discarded – undo
3094 3094
 	$expression = str_replace("\/", "/", $expression);
3095 3095
 	$expression = str_replace("/", "\/", $expression);
3096 3096
 
3097
-	return preg_replace('/' . $expression . '/' . $modif, $replace, $texte);
3097
+	return preg_replace('/'.$expression.'/'.$modif, $replace, $texte);
3098 3098
 }
3099 3099
 
3100 3100
 
@@ -3113,7 +3113,7 @@  discard block
 block discarded – undo
3113 3113
 function traiter_doublons_documents(&$doublons, $letexte) {
3114 3114
 
3115 3115
 	// Verifier dans le texte & les notes (pas beau, helas)
3116
-	$t = $letexte . $GLOBALS['les_notes'];
3116
+	$t = $letexte.$GLOBALS['les_notes'];
3117 3117
 
3118 3118
 	if (strstr($t, 'spip_document_') // evite le preg_match_all si inutile
3119 3119
 		and preg_match_all(
@@ -3123,7 +3123,7 @@  discard block
 block discarded – undo
3123 3123
 		if (!isset($doublons['documents'])) {
3124 3124
 			$doublons['documents'] = "";
3125 3125
 		}
3126
-		$doublons['documents'] .= "," . join(',', $matches[1]);
3126
+		$doublons['documents'] .= ",".join(',', $matches[1]);
3127 3127
 	}
3128 3128
 
3129 3129
 	return $letexte;
@@ -3180,7 +3180,7 @@  discard block
 block discarded – undo
3180 3180
 	if ($env) {
3181 3181
 		foreach ($env as $i => $j) {
3182 3182
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3183
-				$texte .= "<param name='" . $i . "'\n\tvalue='" . $j . "' />";
3183
+				$texte .= "<param name='".$i."'\n\tvalue='".$j."' />";
3184 3184
 			}
3185 3185
 		}
3186 3186
 	}
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
 	if ($env) {
3220 3220
 		foreach ($env as $i => $j) {
3221 3221
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3222
-				$texte .= $i . "='" . $j . "' ";
3222
+				$texte .= $i."='".$j."' ";
3223 3223
 			}
3224 3224
 		}
3225 3225
 	}
@@ -3305,13 +3305,13 @@  discard block
 block discarded – undo
3305 3305
 		$img_file = chemin_image($img);
3306 3306
 	}
3307 3307
 	else {
3308
-		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true){
3308
+		if (!isset($options['variante_svg_si_possible']) or $options['variante_svg_si_possible'] == true) {
3309 3309
 			// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
3310 3310
 			// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
3311 3311
 			if (preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m)
3312
-			  and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . "-xx.svg"
3312
+			  and $variante_svg_generique = substr($img_file, 0, -strlen($m[0]))."-xx.svg"
3313 3313
 			  and file_exists($variante_svg_generique)) {
3314
-				if ($variante_svg_size = substr($variante_svg_generique,0,-6) . $m[1] . ".svg" and file_exists($variante_svg_size)) {
3314
+				if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].".svg" and file_exists($variante_svg_size)) {
3315 3315
 					$img_file = $variante_svg_size;
3316 3316
 				}
3317 3317
 				else {
@@ -3333,12 +3333,12 @@  discard block
 block discarded – undo
3333 3333
 				return "";
3334 3334
 			}
3335 3335
 		}
3336
-		$atts .= " width='" . $largeur . "' height='" . $hauteur . "'";
3336
+		$atts .= " width='".$largeur."' height='".$hauteur."'";
3337 3337
 	}
3338 3338
 
3339
-	return "<img src='$img_file' alt='" . attribut_html($alt ? $alt : $title) . "'"
3340
-	. ($title ? ' title="' . attribut_html($title) . '"' : '')
3341
-	. " " . ltrim($atts)
3339
+	return "<img src='$img_file' alt='".attribut_html($alt ? $alt : $title)."'"
3340
+	. ($title ? ' title="'.attribut_html($title).'"' : '')
3341
+	. " ".ltrim($atts)
3342 3342
 	. " />";
3343 3343
 }
3344 3344
 
@@ -3350,7 +3350,7 @@  discard block
 block discarded – undo
3350 3350
  * @return string
3351 3351
  */
3352 3352
 function http_style_background($img, $att = '') {
3353
-	return " style='background" . ($att ? "" : "-image") . ": url(\"" . chemin_image($img) . "\")" . ($att ? (' ' . $att) : '') . ";'";
3353
+	return " style='background".($att ? "" : "-image").": url(\"".chemin_image($img)."\")".($att ? (' '.$att) : '').";'";
3354 3354
 }
3355 3355
 
3356 3356
 /**
@@ -3365,7 +3365,7 @@  discard block
 block discarded – undo
3365 3365
  *     Code HTML de la balise IMG
3366 3366
  */
3367 3367
 function filtre_balise_img_dist($img, $alt = "", $class = "") {
3368
-	return http_img_pack($img, $alt, $class ? " class='" . attribut_html($class) . "'" : '', '',
3368
+	return http_img_pack($img, $alt, $class ? " class='".attribut_html($class)."'" : '', '',
3369 3369
 		array('chemin_image' => false, 'utiliser_suffixe_size' => false));
3370 3370
 }
3371 3371
 
@@ -3397,11 +3397,11 @@  discard block
 block discarded – undo
3397 3397
 	if ($class) {
3398 3398
 		$balise_svg = inserer_attribut($balise_svg, 'class', $class);
3399 3399
 	}
3400
-	if ($alt){
3400
+	if ($alt) {
3401 3401
 		$balise_svg = inserer_attribut($balise_svg, 'role', 'img');
3402
-		$id = "img-svg-title-" . substr(md5("$file:$svg:$alt"),0,4);
3402
+		$id = "img-svg-title-".substr(md5("$file:$svg:$alt"), 0, 4);
3403 3403
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3404
-		$title = "<title id=\"$id\">" . entites_html($alt)."</title>\n";
3404
+		$title = "<title id=\"$id\">".entites_html($alt)."</title>\n";
3405 3405
 		$balise_svg .= $title;
3406 3406
 	}
3407 3407
 	else {
@@ -3435,7 +3435,7 @@  discard block
 block discarded – undo
3435 3435
 	$texte = '';
3436 3436
 	if (is_array($tableau)) {
3437 3437
 		foreach ($tableau as $k => $v) {
3438
-			$res = recuperer_fond('modeles/' . $modele,
3438
+			$res = recuperer_fond('modeles/'.$modele,
3439 3439
 				array_merge(array('cle' => $k), (is_array($v) ? $v : array('valeur' => $v)))
3440 3440
 			);
3441 3441
 			$texte .= $res;
@@ -3612,7 +3612,7 @@  discard block
 block discarded – undo
3612 3612
 	}
3613 3613
 
3614 3614
 	$c = serialize($c);
3615
-	$cle = calculer_cle_action($form . $c);
3615
+	$cle = calculer_cle_action($form.$c);
3616 3616
 	$c = "$cle:$c";
3617 3617
 
3618 3618
 	// on ne stocke pas les contextes dans des fichiers caches
@@ -3662,15 +3662,15 @@  discard block
 block discarded – undo
3662 3662
 	}
3663 3663
 	// toujours encoder l'url source dans le bloc ajax
3664 3664
 	$r = self();
3665
-	$r = ' data-origin="' . $r . '"';
3665
+	$r = ' data-origin="'.$r.'"';
3666 3666
 	$class = 'ajaxbloc';
3667 3667
 	if ($ajaxid and is_string($ajaxid)) {
3668 3668
 		// ajaxid est normalement conforme a un nom de classe css
3669 3669
 		// on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution
3670
-		$class .= ' ajax-id-' . entites_html($ajaxid);
3670
+		$class .= ' ajax-id-'.entites_html($ajaxid);
3671 3671
 	}
3672 3672
 
3673
-	return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3673
+	return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
3674 3674
 }
3675 3675
 
3676 3676
 /**
@@ -3709,11 +3709,11 @@  discard block
 block discarded – undo
3709 3709
 	// extraire la signature en debut de contexte
3710 3710
 	// et la verifier avant de deserializer
3711 3711
 	// format : signature:donneesserializees
3712
-	if ($p = strpos($c,":")){
3713
-		$cle = substr($c,0,$p);
3714
-		$c = substr($c,$p+1);
3712
+	if ($p = strpos($c, ":")) {
3713
+		$cle = substr($c, 0, $p);
3714
+		$c = substr($c, $p + 1);
3715 3715
 
3716
-		if ($cle == calculer_cle_action($form . $c)) {
3716
+		if ($cle == calculer_cle_action($form.$c)) {
3717 3717
 			$env = @unserialize($c);
3718 3718
 			return $env;
3719 3719
 		}
@@ -3814,9 +3814,9 @@  discard block
 block discarded – undo
3814 3814
 	} else {
3815 3815
 		$bal = 'a';
3816 3816
 		$att = "href='$url'"
3817
-			. ($title ? " title='" . attribut_html($title) . "'" : '')
3818
-			. ($class ? " class='" . attribut_html($class) . "'" : '')
3819
-			. ($rel ? " rel='" . attribut_html($rel) . "'" : '')
3817
+			. ($title ? " title='".attribut_html($title)."'" : '')
3818
+			. ($class ? " class='".attribut_html($class)."'" : '')
3819
+			. ($rel ? " rel='".attribut_html($rel)."'" : '')
3820 3820
 			. $evt;
3821 3821
 	}
3822 3822
 	if ($libelle === null) {
@@ -3890,7 +3890,7 @@  discard block
 block discarded – undo
3890 3890
 	}
3891 3891
 
3892 3892
 	// ajouter le type d'objet dans la class de l'icone
3893
-	$class .= " " . substr(basename($fond), 0, -4);
3893
+	$class .= " ".substr(basename($fond), 0, -4);
3894 3894
 
3895 3895
 	$alt = attribut_html($texte);
3896 3896
 	$title = " title=\"$alt\""; // est-ce pertinent de doubler le alt par un title ?
@@ -3915,7 +3915,7 @@  discard block
 block discarded – undo
3915 3915
 	if ($fonction) {
3916 3916
 		// 2 images pour composer l'icone : le fond (article) en background,
3917 3917
 		// la fonction (new) en image
3918
-		$icone = http_img_pack($fonction, $alt, "width='$size' height='$size'\n" .
3918
+		$icone = http_img_pack($fonction, $alt, "width='$size' height='$size'\n".
3919 3919
 			http_style_background($fond));
3920 3920
 	} else {
3921 3921
 		$icone = http_img_pack($fond, $alt, "width='$size' height='$size'");
@@ -4149,13 +4149,13 @@  discard block
 block discarded – undo
4149 4149
 	$res = "";
4150 4150
 	foreach ($boutons as $page => $detail) {
4151 4151
 		if ($detail->icone and strlen(trim($detail->icone))) {
4152
-			$res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(" . $detail->icone . ");}";
4152
+			$res .= "\n.navigation_avec_icones #bando1_$page {background-image:url(".$detail->icone.");}";
4153 4153
 		}
4154 4154
 		$selecteur = (in_array($page, array('outils_rapides', 'outils_collaboratifs')) ? "" : ".navigation_avec_icones ");
4155 4155
 		if (is_array($detail->sousmenu)) {
4156 4156
 			foreach ($detail->sousmenu as $souspage => $sousdetail) {
4157 4157
 				if ($sousdetail->icone and strlen(trim($sousdetail->icone))) {
4158
-					$res .= "\n$selecteur.bando2_$souspage {background-image:url(" . $sousdetail->icone . ");}";
4158
+					$res .= "\n$selecteur.bando2_$souspage {background-image:url(".$sousdetail->icone.");}";
4159 4159
 				}
4160 4160
 			}
4161 4161
 		}
@@ -4181,17 +4181,17 @@  discard block
 block discarded – undo
4181 4181
  */
4182 4182
 function bouton_action($libelle, $url, $class = "", $confirm = "", $title = "", $callback = "") {
4183 4183
 	if ($confirm) {
4184
-		$confirm = "confirm(\"" . attribut_html($confirm) . "\")";
4184
+		$confirm = "confirm(\"".attribut_html($confirm)."\")";
4185 4185
 		if ($callback) {
4186 4186
 			$callback = "$confirm?($callback):false";
4187 4187
 		} else {
4188 4188
 			$callback = $confirm;
4189 4189
 		}
4190 4190
 	}
4191
-	$onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : "";
4191
+	$onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : "";
4192 4192
 	$title = $title ? " title='$title'" : "";
4193 4193
 
4194
-	return "<form class='bouton_action_post $class' method='post' action='$url'><div>" . form_hidden($url)
4194
+	return "<form class='bouton_action_post $class' method='post' action='$url'><div>".form_hidden($url)
4195 4195
 	. "<button type='submit' class='submit'$title$onclick>$libelle</button></div></form>";
4196 4196
 }
4197 4197
 
@@ -4330,14 +4330,14 @@  discard block
 block discarded – undo
4330 4330
 		$champ_titre = "";
4331 4331
 		if ($demande_titre) {
4332 4332
 			// si pas de titre declare mais champ titre, il sera peuple par le select *
4333
-			$champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : '';
4333
+			$champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : '';
4334 4334
 		}
4335 4335
 		include_spip('base/abstract_sql');
4336 4336
 		include_spip('base/connect_sql');
4337 4337
 		$objets[$type_objet][$id_objet] = sql_fetsel(
4338
-			'*' . $champ_titre,
4338
+			'*'.$champ_titre,
4339 4339
 			$desc['table_sql'],
4340
-			id_table_objet($type_objet) . ' = ' . intval($id_objet)
4340
+			id_table_objet($type_objet).' = '.intval($id_objet)
4341 4341
 		);
4342 4342
 	}
4343 4343
 
@@ -4407,7 +4407,7 @@  discard block
 block discarded – undo
4407 4407
 		return $texte;
4408 4408
 	}
4409 4409
 
4410
-	$traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement);
4410
+	$traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement);
4411 4411
 
4412 4412
 	// Fournir $connect et $Pile[0] au traitement si besoin
4413 4413
 	$Pile = array(0 => $env);
@@ -4441,7 +4441,7 @@  discard block
 block discarded – undo
4441 4441
 	}
4442 4442
 	$url = generer_url_entite($id_objet, $objet, '', '', $connect);
4443 4443
 
4444
-	return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . "</a>";
4444
+	return "<a href='$url' class='$objet'>".couper($titre, $longueur)."</a>";
4445 4445
 }
4446 4446
 
4447 4447
 
@@ -4460,10 +4460,10 @@  discard block
 block discarded – undo
4460 4460
 function wrap($texte, $wrap) {
4461 4461
 	$balises = extraire_balises($wrap);
4462 4462
 	if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) {
4463
-		$texte = $wrap . $texte;
4463
+		$texte = $wrap.$texte;
4464 4464
 		$regs = array_reverse($regs[1]);
4465
-		$wrap = "</" . implode("></", $regs) . ">";
4466
-		$texte = $texte . $wrap;
4465
+		$wrap = "</".implode("></", $regs).">";
4466
+		$texte = $texte.$wrap;
4467 4467
 	}
4468 4468
 
4469 4469
 	return $texte;
@@ -4494,7 +4494,7 @@  discard block
 block discarded – undo
4494 4494
 
4495 4495
 	// caster $u en array si besoin
4496 4496
 	if (is_object($u)) {
4497
-		$u = (array)$u;
4497
+		$u = (array) $u;
4498 4498
 	}
4499 4499
 
4500 4500
 	if (is_array($u)) {
@@ -4515,7 +4515,7 @@  discard block
 block discarded – undo
4515 4515
 		// sinon on passe a la ligne et on indente
4516 4516
 		$i_str = str_pad("", $indent, " ");
4517 4517
 		foreach ($u as $k => $v) {
4518
-			$out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2);
4518
+			$out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2);
4519 4519
 		}
4520 4520
 
4521 4521
 		return $out;
@@ -4568,7 +4568,7 @@  discard block
 block discarded – undo
4568 4568
  * @return string
4569 4569
  */
4570 4570
 function objet_icone($objet, $taille = 24) {
4571
-	$icone = objet_info($objet, 'icone_objet') . "-" . $taille . ".png";
4571
+	$icone = objet_info($objet, 'icone_objet')."-".$taille.".png";
4572 4572
 	$icone = chemin_image($icone);
4573 4573
 	$balise_img = charger_filtre('balise_img');
4574 4574
 
@@ -4592,12 +4592,12 @@  discard block
 block discarded – undo
4592 4592
  * @param array $options
4593 4593
  * @return string
4594 4594
  */
4595
-function objet_T($objet, $chaine, $args = array(), $options = array()){
4596
-	$chaine = explode(':',$chaine);
4597
-	if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, array('force'=>false)))) {
4595
+function objet_T($objet, $chaine, $args = array(), $options = array()) {
4596
+	$chaine = explode(':', $chaine);
4597
+	if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, array('force'=>false)))) {
4598 4598
 		return $t;
4599 4599
 	}
4600
-	$chaine = implode(':',$chaine);
4600
+	$chaine = implode(':', $chaine);
4601 4601
 	return _T($chaine, $args, $options);
4602 4602
 }
4603 4603
 
@@ -4657,11 +4657,11 @@  discard block
 block discarded – undo
4657 4657
 	$cache = recuperer_fond($fond, $contexte, $options, $connect);
4658 4658
 
4659 4659
 	// calculer le nom de la css
4660
-	$dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension);
4660
+	$dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension);
4661 4661
 	$nom_safe = preg_replace(",\W,", '_', str_replace('.', '_', $fond));
4662 4662
 	$contexte_implicite = calculer_contexte_implicite();
4663
-	$filename = $dir_var . $extension . "dyn-$nom_safe-"
4664
-		. substr(md5($fond . serialize($contexte_implicite) . serialize($contexte) . $connect), 0, 8)
4663
+	$filename = $dir_var.$extension."dyn-$nom_safe-"
4664
+		. substr(md5($fond.serialize($contexte_implicite).serialize($contexte).$connect), 0, 8)
4665 4665
 		. ".$extension";
4666 4666
 
4667 4667
 	// mettre a jour le fichier si il n'existe pas
@@ -4669,8 +4669,8 @@  discard block
 block discarded – undo
4669 4669
 	// le dernier fichier produit est toujours suffixe par .last
4670 4670
 	// et recopie sur le fichier cible uniquement si il change
4671 4671
 	if (!file_exists($filename)
4672
-		or !file_exists($filename . ".last")
4673
-		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . ".last") < $cache['lastmodified'])
4672
+		or !file_exists($filename.".last")
4673
+		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.".last") < $cache['lastmodified'])
4674 4674
 		or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul')
4675 4675
 	) {
4676 4676
 		$contenu = $cache['texte'];
@@ -4689,15 +4689,15 @@  discard block
 block discarded – undo
4689 4689
 			}
4690 4690
 			// pas de date dans le commentaire car sinon ca invalide le md5 et force la maj
4691 4691
 			// mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non
4692
-			$comment .= "}\n   md5:" . md5($contenu) . " */\n";
4692
+			$comment .= "}\n   md5:".md5($contenu)." */\n";
4693 4693
 		}
4694 4694
 		// et ecrire le fichier
4695
-		ecrire_fichier($filename . ".last", $comment . $contenu);
4695
+		ecrire_fichier($filename.".last", $comment.$contenu);
4696 4696
 		// regarder si on recopie
4697 4697
 		if (!file_exists($filename)
4698
-			or md5_file($filename) !== md5_file($filename . ".last")
4698
+			or md5_file($filename) !== md5_file($filename.".last")
4699 4699
 		) {
4700
-			@copy($filename . ".last", $filename);
4700
+			@copy($filename.".last", $filename);
4701 4701
 			clearstatcache(true, $filename); // eviter que PHP ne reserve le vieux timestamp
4702 4702
 		}
4703 4703
 	}
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +127 added lines, -129 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
 	if (strlen($dossier) and substr($dossier, -1) != '/') {
54 54
 		$dossier .= '/';
55 55
 	}
56
-	$f = str_replace('/', '_', $dossier) . $nom;
56
+	$f = str_replace('/', '_', $dossier).$nom;
57 57
 
58 58
 	if (function_exists($f)) {
59 59
 		return $f;
60 60
 	}
61
-	if (function_exists($g = $f . '_dist')) {
61
+	if (function_exists($g = $f.'_dist')) {
62 62
 		return $g;
63 63
 	}
64 64
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 	// passer en minuscules (cf les balises de formulaires)
80 80
 	// et inclure le fichier
81
-	if (!$inc = include_spip($dossier . ($d = strtolower($nom)))
81
+	if (!$inc = include_spip($dossier.($d = strtolower($nom)))
82 82
 		// si le fichier truc/machin/nom.php n'existe pas,
83 83
 		// la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
84 84
 		and strlen(dirname($dossier)) and dirname($dossier) != '.'
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	// Echec : message d'erreur
100
-	spip_log("fonction $nom ($f ou $g) indisponible" .
100
+	spip_log("fonction $nom ($f ou $g) indisponible".
101 101
 		($inc ? "" : " (fichier $d absent de $dossier)"));
102 102
 
103 103
 	include_spip('inc/minipres');
104 104
 	echo minipres(_T('forum_titre_erreur'),
105
-		_T('fichier_introuvable', array('fichier' => '<b>' . spip_htmlentities($d) . '</b>')),
106
-		array('all_inline'=>true,'status'=>404));
105
+		_T('fichier_introuvable', array('fichier' => '<b>'.spip_htmlentities($d).'</b>')),
106
+		array('all_inline'=>true, 'status'=>404));
107 107
 	exit;
108 108
 }
109 109
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
  *     - string : chemin du fichier trouvé
149 149
  **/
150 150
 function include_spip($f, $include = true) {
151
-	return find_in_path($f . '.php', '', $include);
151
+	return find_in_path($f.'.php', '', $include);
152 152
 }
153 153
 
154 154
 /**
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
  *     - string : chemin du fichier trouvé
169 169
  **/
170 170
 function require_spip($f) {
171
-	return find_in_path($f . '.php', '', 'required');
171
+	return find_in_path($f.'.php', '', 'required');
172 172
 }
173 173
 
174 174
 /**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	}
261 261
 
262 262
 	// appliquer notre fonction si elle existe
263
-	$fonc = 'execute_pipeline_' . strtolower($action);
263
+	$fonc = 'execute_pipeline_'.strtolower($action);
264 264
 	if (function_exists($fonc)) {
265 265
 		$val = $fonc($val);
266 266
 	} // plantage ?
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 function spip_log($message = null, $name = null) {
325 325
 	static $pre = array();
326 326
 	static $log;
327
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
327
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
328 328
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
329 329
 		$logname = null;
330 330
 	}
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 		if (!is_string($message)) {
350 350
 			$message = print_r($message, true);
351 351
 		}
352
-		$log($pre[$niveau] . ' ' . $message, $logname);
352
+		$log($pre[$niveau].' '.$message, $logname);
353 353
 	}
354 354
 }
355 355
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 		$a = './';
513 513
 	}
514 514
 
515
-	$regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,';
515
+	$regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,';
516 516
 	$ajouts = array_flip(explode('|', $c));
517 517
 	$u = is_array($v) ? $v : rawurlencode($v);
518 518
 	$testv = (is_array($v) ? count($v) : strlen($v));
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 			// Ajout. Pour une variable, remplacer au meme endroit,
540 540
 			// pour un tableau ce sera fait dans la prochaine boucle
541 541
 			elseif (substr($r[1], -2) != '[]') {
542
-				$url[$n] = $r[1] . '=' . $u;
542
+				$url[$n] = $r[1].'='.$u;
543 543
 				unset($ajouts[$r[1]]);
544 544
 			}
545 545
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -559,11 +559,11 @@  discard block
 block discarded – undo
559 559
 	} elseif ($testv) {
560 560
 		foreach ($ajouts as $k => $n) {
561 561
 			if (!is_array($v)) {
562
-				$url[] = $k . '=' . $u;
562
+				$url[] = $k.'='.$u;
563 563
 			} else {
564
-				$id = (substr($k, -2) == '[]') ? $k : ($k . "[]");
564
+				$id = (substr($k, -2) == '[]') ? $k : ($k."[]");
565 565
 				foreach ($v as $w) {
566
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : $w);
566
+					$url[] = $id.'='.(is_array($w) ? 'Array' : $w);
567 567
 				}
568 568
 			}
569 569
 		}
@@ -574,10 +574,10 @@  discard block
 block discarded – undo
574 574
 
575 575
 	// recomposer l'adresse
576 576
 	if ($url) {
577
-		$a .= '?' . join($sep, $url);
577
+		$a .= '?'.join($sep, $url);
578 578
 	}
579 579
 
580
-	return $a . $ancre;
580
+	return $a.$ancre;
581 581
 }
582 582
 
583 583
 /**
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 			translitteration($ancre)
610 610
 		);
611 611
 	}
612
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
612
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
613 613
 }
614 614
 
615 615
 /**
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
  * @return bool
722 722
  */
723 723
 function test_plugin_actif($plugin) {
724
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
724
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
725 725
 }
726 726
 
727 727
 /**
@@ -789,8 +789,7 @@  discard block
 block discarded – undo
789 789
 		// pour les chaines non traduites, assurer un service minimum
790 790
 		if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
791 791
 			$text = str_replace('_', ' ',
792
-				(($n = strpos($text, ':')) === false ? $texte :
793
-					substr($texte, $n + 1)));
792
+				(($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1)));
794 793
 		}
795 794
 		$o['class'] = null;
796 795
 
@@ -862,7 +861,7 @@  discard block
 block discarded – undo
862 861
 		// Si des variables n'ont pas ete inserees, le signaler
863 862
 		// (chaines de langues pas a jour)
864 863
 		if ($args) {
865
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
864
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
866 865
 		}
867 866
 	}
868 867
 
@@ -886,7 +885,7 @@  discard block
 block discarded – undo
886 885
 function joli_repertoire($rep) {
887 886
 	$a = substr($rep, 0, 1);
888 887
 	if ($a <> '.' and $a <> '/') {
889
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
888
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
890 889
 	}
891 890
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
892 891
 
@@ -940,7 +939,7 @@  discard block
 block discarded – undo
940 939
 			$p -= ($x * 1000);
941 940
 		}
942 941
 
943
-		return $s . sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
942
+		return $s.sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
944 943
 	}
945 944
 }
946 945
 
@@ -1009,7 +1008,7 @@  discard block
 block discarded – undo
1009 1008
 	if ($taches and count($taches) and !spip_connect()) {
1010 1009
 		return false;
1011 1010
 	}
1012
-	spip_log("cron !", 'jq' . _LOG_DEBUG);
1011
+	spip_log("cron !", 'jq'._LOG_DEBUG);
1013 1012
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1014 1013
 		return $genie($taches);
1015 1014
 	}
@@ -1113,7 +1112,7 @@  discard block
 block discarded – undo
1113 1112
 
1114 1113
 	if ($queue_next_job_time == -1) {
1115 1114
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1116
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . "job_queue_next.txt");
1115
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP."job_queue_next.txt");
1117 1116
 		}
1118 1117
 		// utiliser un cache memoire si dispo
1119 1118
 		if (function_exists("cache_get") and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1180,8 +1179,8 @@  discard block
 block discarded – undo
1180 1179
 		$src = '';
1181 1180
 	}
1182 1181
 	if ($script) {
1183
-		$script = ("/*<![CDATA[*/\n" .
1184
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1182
+		$script = ("/*<![CDATA[*/\n".
1183
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1185 1184
 			"/*]]>*/");
1186 1185
 	}
1187 1186
 	if ($noscript) {
@@ -1267,13 +1266,13 @@  discard block
 block discarded – undo
1267 1266
 	if ($path_base == null) {
1268 1267
 		// Chemin standard depuis l'espace public
1269 1268
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1270
-			_DIR_RACINE . ':' .
1271
-			_DIR_RACINE . 'squelettes-dist/:' .
1272
-			_DIR_RACINE . 'prive/:' .
1269
+			_DIR_RACINE.':'.
1270
+			_DIR_RACINE.'squelettes-dist/:'.
1271
+			_DIR_RACINE.'prive/:'.
1273 1272
 			_DIR_RESTREINT;
1274 1273
 		// Ajouter squelettes/
1275
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1276
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1274
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1275
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1277 1276
 		}
1278 1277
 		foreach (explode(':', $path) as $dir) {
1279 1278
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1285,7 +1284,7 @@  discard block
 block discarded – undo
1285 1284
 		// Et le(s) dossier(s) des squelettes nommes
1286 1285
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1287 1286
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1288
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1287
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1289 1288
 			}
1290 1289
 		}
1291 1290
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1296,7 +1295,7 @@  discard block
 block discarded – undo
1296 1295
 
1297 1296
 	if (strlen($dir_path)) {
1298 1297
 		$tete = "";
1299
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1298
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1300 1299
 			$tete = array_shift($path_base);
1301 1300
 		}
1302 1301
 		$dirs = array_reverse(explode(':', $dir_path));
@@ -1318,7 +1317,7 @@  discard block
 block discarded – undo
1318 1317
 	// Et le(s) dossier(s) des squelettes nommes
1319 1318
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1320 1319
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1321
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1320
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1322 1321
 		}
1323 1322
 	}
1324 1323
 
@@ -1388,9 +1387,9 @@  discard block
 block discarded – undo
1388 1387
 	// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1389 1388
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1390 1389
 	if (preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1391
-	  and $file_svg_generique = substr($file,0, -strlen($m[0])) . "-xx.svg"
1390
+	  and $file_svg_generique = substr($file, 0, -strlen($m[0]))."-xx.svg"
1392 1391
 		and $f = find_in_theme("$file_svg_generique")) {
1393
-		if ($fsize = substr($f,0,-6) . $m[1] . ".svg" and file_exists($fsize)) {
1392
+		if ($fsize = substr($f, 0, -6).$m[1].".svg" and file_exists($fsize)) {
1394 1393
 			return $themefiles["$subdir$file"] = $fsize;
1395 1394
 		}
1396 1395
 		else {
@@ -1404,7 +1403,7 @@  discard block
 block discarded – undo
1404 1403
 			return $themefiles["$subdir$file"] = $f;
1405 1404
 		}
1406 1405
 	}
1407
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1406
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1408 1407
 
1409 1408
 	return $themefiles["$subdir$file"] = "";
1410 1409
 }
@@ -1505,8 +1504,8 @@  discard block
 block discarded – undo
1505 1504
 			return false;
1506 1505
 		}
1507 1506
 		if ($include and !isset($inc[$dirname][$file])) {
1508
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1509
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1507
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1508
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1510 1509
 		}
1511 1510
 
1512 1511
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1519,14 +1518,14 @@  discard block
 block discarded – undo
1519 1518
 	}
1520 1519
 
1521 1520
 	foreach (creer_chemin() as $dir) {
1522
-		if (!isset($dirs[$a = $dir . $dirname])) {
1523
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1521
+		if (!isset($dirs[$a = $dir.$dirname])) {
1522
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1524 1523
 		}
1525 1524
 		if ($dirs[$a]) {
1526
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1525
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1527 1526
 				if ($include and !isset($inc[$dirname][$file])) {
1528
-					include_once _ROOT_CWD . $a;
1529
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1527
+					include_once _ROOT_CWD.$a;
1528
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1530 1529
 				}
1531 1530
 				if (!defined('_SAUVER_CHEMIN')) {
1532 1531
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1536,7 +1535,7 @@  discard block
 block discarded – undo
1536 1535
 					define('_SAUVER_CHEMIN', true);
1537 1536
 				}
1538 1537
 
1539
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1538
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1540 1539
 			}
1541 1540
 		}
1542 1541
 	}
@@ -1562,7 +1561,7 @@  discard block
 block discarded – undo
1562 1561
 		define('_SAUVER_CHEMIN', true);
1563 1562
 	}
1564 1563
 
1565
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1564
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1566 1565
 }
1567 1566
 
1568 1567
 function clear_path_cache() {
@@ -1631,12 +1630,12 @@  discard block
 block discarded – undo
1631 1630
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1632 1631
 	// on a pas encore inclus flock.php
1633 1632
 	if (!function_exists('preg_files')) {
1634
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1633
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1635 1634
 	}
1636 1635
 
1637 1636
 	// Parcourir le chemin
1638 1637
 	foreach (creer_chemin() as $d) {
1639
-		$f = $d . $dir;
1638
+		$f = $d.$dir;
1640 1639
 		if (@is_dir($f)) {
1641 1640
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? array() : $recurs);
1642 1641
 			foreach ($liste as $chemin) {
@@ -1666,9 +1665,9 @@  discard block
 block discarded – undo
1666 1665
 	static $autsanscookie = array('install', 'base_repair');
1667 1666
 
1668 1667
 	if (in_array($nom, $autsanscookie)) {
1669
-		if (test_espace_prive()){
1668
+		if (test_espace_prive()) {
1670 1669
 			include_spip('base/connect_sql');
1671
-			if (!$strict or !spip_connect()){
1670
+			if (!$strict or !spip_connect()) {
1672 1671
 				return true;
1673 1672
 			}
1674 1673
 		}
@@ -1747,7 +1746,7 @@  discard block
 block discarded – undo
1747 1746
 		return $res;
1748 1747
 	}
1749 1748
 	// Sinon c'est un raccourci ou compat SPIP < 2
1750
-	if (!function_exists($f = 'generer_url_' . $entite)) {
1749
+	if (!function_exists($f = 'generer_url_'.$entite)) {
1751 1750
 		if (!function_exists($f .= '_dist')) {
1752 1751
 			$f = '';
1753 1752
 		}
@@ -1756,8 +1755,8 @@  discard block
 block discarded – undo
1756 1755
 		$url = $f($id, $args, $ancre);
1757 1756
 		if (strlen($args)) {
1758 1757
 			$url .= strstr($url, '?')
1759
-				? '&amp;' . $args
1760
-				: '?' . $args;
1758
+				? '&amp;'.$args
1759
+				: '?'.$args;
1761 1760
 		}
1762 1761
 
1763 1762
 		return $url;
@@ -1788,8 +1787,8 @@  discard block
 block discarded – undo
1788 1787
 	include_spip('base/connect_sql');
1789 1788
 	$id_type = id_table_objet($entite, $public);
1790 1789
 
1791
-	return _DIR_RACINE . get_spip_script('./')
1792
-	. "?" . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1790
+	return _DIR_RACINE.get_spip_script('./')
1791
+	. "?"._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1793 1792
 	. (!$args ? '' : "&$args")
1794 1793
 	. (!$ancre ? '' : "#$ancre");
1795 1794
 }
@@ -1941,7 +1940,7 @@  discard block
 block discarded – undo
1941 1940
 			if (!empty($_SERVER['QUERY_STRING'])
1942 1941
 				and !strpos($_SERVER['REQUEST_URI'], '?')
1943 1942
 			) {
1944
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
1943
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
1945 1944
 			}
1946 1945
 		}
1947 1946
 	}
@@ -1968,17 +1967,17 @@  discard block
 block discarded – undo
1968 1967
 	list($myself) = explode('?', $myself);
1969 1968
 	// vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
1970 1969
 	// protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
1971
-	if (strpos($myself,'://') !== false) {
1972
-		$myself = explode('://',$myself);
1970
+	if (strpos($myself, '://') !== false) {
1971
+		$myself = explode('://', $myself);
1973 1972
 		array_shift($myself);
1974
-		$myself = implode('://',$myself);
1975
-		$myself = explode('/',$myself);
1973
+		$myself = implode('://', $myself);
1974
+		$myself = explode('/', $myself);
1976 1975
 		array_shift($myself);
1977
-		$myself = implode('/',$myself);
1976
+		$myself = implode('/', $myself);
1978 1977
 	}
1979
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
1978
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
1980 1979
 
1981
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
1980
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
1982 1981
 
1983 1982
 	return $url;
1984 1983
 }
@@ -2016,17 +2015,17 @@  discard block
 block discarded – undo
2016 2015
  **/
2017 2016
 function generer_url_ecrire($script = '', $args = "", $no_entities = false, $rel = false) {
2018 2017
 	if (!$rel) {
2019
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2018
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2020 2019
 	} else {
2021 2020
 		if (!is_string($rel)) {
2022 2021
 			$rel = _DIR_RESTREINT ? _DIR_RESTREINT :
2023
-				('./' . _SPIP_ECRIRE_SCRIPT);
2022
+				('./'._SPIP_ECRIRE_SCRIPT);
2024 2023
 		}
2025 2024
 	}
2026 2025
 
2027 2026
 	list($script, $ancre) = array_pad(explode('#', $script), 2, null);
2028 2027
 	if ($script and ($script <> 'accueil' or $rel)) {
2029
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2028
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2030 2029
 	} elseif ($args) {
2031 2030
 		$args = "?$args";
2032 2031
 	}
@@ -2034,7 +2033,7 @@  discard block
 block discarded – undo
2034 2033
 		$args .= "#$ancre";
2035 2034
 	}
2036 2035
 
2037
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2036
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2038 2037
 }
2039 2038
 
2040 2039
 //
@@ -2104,25 +2103,25 @@  discard block
 block discarded – undo
2104 2103
 		if (is_array($args)) {
2105 2104
 			$r = '';
2106 2105
 			foreach ($args as $k => $v) {
2107
-				$r .= '&' . $k . '=' . $v;
2106
+				$r .= '&'.$k.'='.$v;
2108 2107
 			}
2109 2108
 			$args = substr($r, 1);
2110 2109
 		}
2111 2110
 		$action .=
2112
-			(strpos($action, '?') !== false ? '&' : '?') . $args;
2111
+			(strpos($action, '?') !== false ? '&' : '?').$args;
2113 2112
 	}
2114 2113
 	if (!$no_entities) {
2115 2114
 		$action = quote_amp($action);
2116 2115
 	}
2117 2116
 
2118 2117
 	// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2119
-	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(",^/[.]/,", "/", "/$action"));
2118
+	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(",^/[.]/,", "/", "/$action"));
2120 2119
 }
2121 2120
 
2122 2121
 // http://code.spip.net/@generer_url_prive
2123 2122
 function generer_url_prive($script, $args = "", $no_entities = false) {
2124 2123
 
2125
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2124
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2126 2125
 }
2127 2126
 
2128 2127
 // Pour les formulaires en methode POST,
@@ -2157,8 +2156,7 @@  discard block
 block discarded – undo
2157 2156
 	. "><div>\n"
2158 2157
 	. "<input type='hidden' name='exec' value='$script1' />"
2159 2158
 	. $corps
2160
-	. (!$submit ? '' :
2161
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo' type='submit' value=\"" . entites_html($submit) . "\" /></div>"))
2159
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo' type='submit' value=\"".entites_html($submit)."\" /></div>"))
2162 2160
 	. "</div></form>\n";
2163 2161
 }
2164 2162
 
@@ -2183,14 +2181,14 @@  discard block
 block discarded – undo
2183 2181
 		? generer_url_ecrire(_request('exec'))
2184 2182
 		: generer_url_public();
2185 2183
 
2186
-	return "\n<form action='" .
2187
-	$h .
2188
-	"'" .
2189
-	$atts .
2190
-	">\n" .
2191
-	"<div>" .
2192
-	"\n<input type='hidden' name='action' value='$script' />" .
2193
-	$corps .
2184
+	return "\n<form action='".
2185
+	$h.
2186
+	"'".
2187
+	$atts.
2188
+	">\n".
2189
+	"<div>".
2190
+	"\n<input type='hidden' name='action' value='$script' />".
2191
+	$corps.
2194 2192
 	"</div></form>";
2195 2193
 }
2196 2194
 
@@ -2218,7 +2216,7 @@  discard block
 block discarded – undo
2218 2216
 		: generer_url_public('', '', false, false);
2219 2217
 	$url = parametre_url($url, 'action', $script);
2220 2218
 	if ($args) {
2221
-		$url .= quote_amp('&' . $args);
2219
+		$url .= quote_amp('&'.$args);
2222 2220
 	}
2223 2221
 
2224 2222
 	if ($no_entities) {
@@ -2268,17 +2266,17 @@  discard block
 block discarded – undo
2268 2266
 
2269 2267
 	// le nom du repertoire plugins/ activables/desactivables
2270 2268
 	if (!defined('_DIR_PLUGINS')) {
2271
-		define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
2269
+		define('_DIR_PLUGINS', _DIR_RACINE."plugins/");
2272 2270
 	}
2273 2271
 
2274 2272
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2275 2273
 	if (!defined('_DIR_PLUGINS_DIST')) {
2276
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . "plugins-dist/");
2274
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE."plugins-dist/");
2277 2275
 	}
2278 2276
 
2279 2277
 	// le nom du repertoire des librairies
2280 2278
 	if (!defined('_DIR_LIB')) {
2281
-		define('_DIR_LIB', _DIR_RACINE . "lib/");
2279
+		define('_DIR_LIB', _DIR_RACINE."lib/");
2282 2280
 	}
2283 2281
 
2284 2282
 	if (!defined('_DIR_IMG')) {
@@ -2288,29 +2286,29 @@  discard block
 block discarded – undo
2288 2286
 		define('_DIR_LOGOS', $pa);
2289 2287
 	}
2290 2288
 	if (!defined('_DIR_IMG_ICONES')) {
2291
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . "icones/");
2289
+		define('_DIR_IMG_ICONES', _DIR_LOGOS."icones/");
2292 2290
 	}
2293 2291
 
2294 2292
 	if (!defined('_DIR_DUMP')) {
2295
-		define('_DIR_DUMP', $ti . "dump/");
2293
+		define('_DIR_DUMP', $ti."dump/");
2296 2294
 	}
2297 2295
 	if (!defined('_DIR_SESSIONS')) {
2298
-		define('_DIR_SESSIONS', $ti . "sessions/");
2296
+		define('_DIR_SESSIONS', $ti."sessions/");
2299 2297
 	}
2300 2298
 	if (!defined('_DIR_TRANSFERT')) {
2301
-		define('_DIR_TRANSFERT', $ti . "upload/");
2299
+		define('_DIR_TRANSFERT', $ti."upload/");
2302 2300
 	}
2303 2301
 	if (!defined('_DIR_CACHE')) {
2304
-		define('_DIR_CACHE', $ti . "cache/");
2302
+		define('_DIR_CACHE', $ti."cache/");
2305 2303
 	}
2306 2304
 	if (!defined('_DIR_CACHE_XML')) {
2307
-		define('_DIR_CACHE_XML', _DIR_CACHE . "xml/");
2305
+		define('_DIR_CACHE_XML', _DIR_CACHE."xml/");
2308 2306
 	}
2309 2307
 	if (!defined('_DIR_SKELS')) {
2310
-		define('_DIR_SKELS', _DIR_CACHE . "skel/");
2308
+		define('_DIR_SKELS', _DIR_CACHE."skel/");
2311 2309
 	}
2312 2310
 	if (!defined('_DIR_AIDE')) {
2313
-		define('_DIR_AIDE', _DIR_CACHE . "aide/");
2311
+		define('_DIR_AIDE', _DIR_CACHE."aide/");
2314 2312
 	}
2315 2313
 	if (!defined('_DIR_TMP')) {
2316 2314
 		define('_DIR_TMP', $ti);
@@ -2340,27 +2338,27 @@  discard block
 block discarded – undo
2340 2338
 	// Declaration des fichiers
2341 2339
 
2342 2340
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2343
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . "charger_plugins_chemins.php");
2341
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE."charger_plugins_chemins.php");
2344 2342
 	}
2345 2343
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2346
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php");
2344
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE."charger_plugins_options.php");
2347 2345
 	}
2348 2346
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2349
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php");
2347
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE."charger_plugins_fonctions.php");
2350 2348
 	}
2351 2349
 	if (!defined('_CACHE_PIPELINES')) {
2352
-		define('_CACHE_PIPELINES', _DIR_CACHE . "charger_pipelines.php");
2350
+		define('_CACHE_PIPELINES', _DIR_CACHE."charger_pipelines.php");
2353 2351
 	}
2354 2352
 	if (!defined('_CACHE_CHEMIN')) {
2355
-		define('_CACHE_CHEMIN', _DIR_CACHE . "chemin.txt");
2353
+		define('_CACHE_CHEMIN', _DIR_CACHE."chemin.txt");
2356 2354
 	}
2357 2355
 
2358 2356
 	# attention .php obligatoire pour ecrire_fichier_securise
2359 2357
 	if (!defined('_FILE_META')) {
2360
-		define('_FILE_META', $ti . 'meta_cache.php');
2358
+		define('_FILE_META', $ti.'meta_cache.php');
2361 2359
 	}
2362 2360
 	if (!defined('_DIR_LOG')) {
2363
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2361
+		define('_DIR_LOG', _DIR_TMP.'log/');
2364 2362
 	}
2365 2363
 	if (!defined('_FILE_LOG')) {
2366 2364
 		define('_FILE_LOG', 'spip');
@@ -2376,8 +2374,8 @@  discard block
 block discarded – undo
2376 2374
 	}
2377 2375
 	if (!defined('_FILE_CONNECT')) {
2378 2376
 		define('_FILE_CONNECT',
2379
-		(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2380
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2377
+		(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2378
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2381 2379
 				: false)));
2382 2380
 	}
2383 2381
 
@@ -2387,7 +2385,7 @@  discard block
 block discarded – undo
2387 2385
 	}
2388 2386
 	if (!defined('_FILE_CHMOD')) {
2389 2387
 		define('_FILE_CHMOD',
2390
-		(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2388
+		(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2391 2389
 			: false));
2392 2390
 	}
2393 2391
 
@@ -2399,10 +2397,10 @@  discard block
 block discarded – undo
2399 2397
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2400 2398
 	}
2401 2399
 	if (!defined('_FILE_CONNECT_TMP')) {
2402
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2400
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2403 2401
 	}
2404 2402
 	if (!defined('_FILE_CHMOD_TMP')) {
2405
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2403
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2406 2404
 	}
2407 2405
 
2408 2406
 	// Definition des droits d'acces en ecriture
@@ -2420,13 +2418,13 @@  discard block
 block discarded – undo
2420 2418
 		define('_DEFAULT_CHARSET', 'utf-8');
2421 2419
 	}
2422 2420
 	if (!defined('_ROOT_PLUGINS')) {
2423
-		define('_ROOT_PLUGINS', _ROOT_RACINE . "plugins/");
2421
+		define('_ROOT_PLUGINS', _ROOT_RACINE."plugins/");
2424 2422
 	}
2425 2423
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2426
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . "plugins-dist/");
2424
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE."plugins-dist/");
2427 2425
 	}
2428 2426
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2429
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2427
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2430 2428
 	}
2431 2429
 
2432 2430
 	// La taille des Log
@@ -2463,7 +2461,7 @@  discard block
 block discarded – undo
2463 2461
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2464 2462
 	// pour le rendre surchargeable, on va provoquer un reecriture
2465 2463
 	// systematique du noyau ou une baisse de perfs => a etudier)
2466
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2464
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2467 2465
 
2468 2466
 	// charger tout de suite le path et son cache
2469 2467
 	load_path_cache();
@@ -2510,7 +2508,7 @@  discard block
 block discarded – undo
2510 2508
 		if (!empty($_SERVER['QUERY_STRING'])
2511 2509
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2512 2510
 		) {
2513
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2511
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2514 2512
 		}
2515 2513
 	}
2516 2514
 
@@ -2546,7 +2544,7 @@  discard block
 block discarded – undo
2546 2544
 
2547 2545
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2548 2546
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2549
-				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/';
2547
+				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/';
2550 2548
 			} else {
2551 2549
 				$uri_ref = "";
2552 2550
 			}
@@ -2634,7 +2632,7 @@  discard block
 block discarded – undo
2634 2632
 	}
2635 2633
 	if (!defined('_CACHE_RUBRIQUES')) {
2636 2634
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2637
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2635
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2638 2636
 	}
2639 2637
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2640 2638
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -2726,7 +2724,7 @@  discard block
 block discarded – undo
2726 2724
 					$memory *= 1024;
2727 2725
 			}
2728 2726
 			if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) {
2729
-				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M');
2727
+				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M');
2730 2728
 				if (trim(ini_get('memory_limit')) != $m) {
2731 2729
 					if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) {
2732 2730
 						define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
@@ -2876,7 +2874,7 @@  discard block
 block discarded – undo
2876 2874
 					}
2877 2875
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
2878 2876
 						spip_log($GLOBALS['visiteur_session']['nom']
2879
-							. " " . _VAR_MODE);
2877
+							. " "._VAR_MODE);
2880 2878
 					}
2881 2879
 				} // pas autorise ?
2882 2880
 				else {
@@ -2884,7 +2882,7 @@  discard block
 block discarded – undo
2884 2882
 					if (!$GLOBALS['visiteur_session']) {
2885 2883
 						include_spip('inc/headers');
2886 2884
 						redirige_par_entete(generer_url_public('login',
2887
-							'url=' . rawurlencode(
2885
+							'url='.rawurlencode(
2888 2886
 								parametre_url(self(), 'var_mode', $_GET['var_mode'], '&')
2889 2887
 							), true));
2890 2888
 					}
@@ -2937,10 +2935,10 @@  discard block
 block discarded – undo
2937 2935
 	// mais on risque de perturber des plugins en initialisant trop tot
2938 2936
 	// certaines constantes
2939 2937
 	@spip_initialisation_core(
2940
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
2941
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
2942
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
2943
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
2938
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
2939
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
2940
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
2941
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
2944 2942
 	);
2945 2943
 
2946 2944
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -2973,7 +2971,7 @@  discard block
 block discarded – undo
2973 2971
 	}
2974 2972
 
2975 2973
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
2976
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
2974
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
2977 2975
 
2978 2976
 		$session = charger_fonction('session', 'inc');
2979 2977
 		if ($session()) {
@@ -3053,7 +3051,7 @@  discard block
 block discarded – undo
3053 3051
 		$s = pipeline('definir_session',
3054 3052
 			$GLOBALS['visiteur_session']
3055 3053
 				? serialize($GLOBALS['visiteur_session'])
3056
-				. '_' . @$_COOKIE['spip_session']
3054
+				. '_'.@$_COOKIE['spip_session']
3057 3055
 				: ''
3058 3056
 		);
3059 3057
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3198,12 +3196,12 @@  discard block
 block discarded – undo
3198 3196
 	$GLOBALS['_INC_PUBLIC']++;
3199 3197
 
3200 3198
 	// fix #4235
3201
-	$cache_utilise_session_appelant	= (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3199
+	$cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3202 3200
 
3203 3201
 
3204 3202
 	foreach (is_array($fond) ? $fond : array($fond) as $f) {
3205 3203
 		
3206
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3204
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3207 3205
 
3208 3206
 		$page = evaluer_fond($f, $contexte, $connect);
3209 3207
 		if ($page === '') {
@@ -3242,7 +3240,7 @@  discard block
 block discarded – undo
3242 3240
 		}
3243 3241
 		
3244 3242
 		// contamination de la session appelante, pour les inclusions statiques
3245
-		if (isset($page['invalideurs']['session'])){
3243
+		if (isset($page['invalideurs']['session'])) {
3246 3244
 			$cache_utilise_session_appelant = $page['invalideurs']['session'];
3247 3245
 		}
3248 3246
 	}
@@ -3288,7 +3286,7 @@  discard block
 block discarded – undo
3288 3286
  * @return array|string
3289 3287
  */
3290 3288
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3291
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3289
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3292 3290
 	if (!$pathinfo) {
3293 3291
 		return $f;
3294 3292
 	}
@@ -3528,7 +3526,7 @@  discard block
 block discarded – undo
3528 3526
 
3529 3527
 			if (!is_array($params[0])) {
3530 3528
 				trigger_error(
3531
-					'array_column() expects parameter 1 to be array, ' . gettype($params[0]) . ' given',
3529
+					'array_column() expects parameter 1 to be array, '.gettype($params[0]).' given',
3532 3530
 					E_USER_WARNING
3533 3531
 				);
3534 3532
 				return null;
Please login to merge, or discard this patch.