Completed
Push — master ( ca33a7...5e73c9 )
by cam
01:08
created
ecrire/inc/filtres.php 1 patch
Spacing   +124 added lines, -125 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	}
97 97
 
98 98
 	include_fichiers_fonctions();
99
-	foreach (['filtre_' . $fonc, 'filtre_' . $fonc . '_dist', $fonc] as $f) {
99
+	foreach (['filtre_'.$fonc, 'filtre_'.$fonc.'_dist', $fonc] as $f) {
100 100
 		trouver_filtre_matrice($f); // charge des fichiers spécifiques éventuels
101 101
 		if (is_callable($f)) {
102 102
 			return $f;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	// affichage "GIT [master: abcdef]"
232 232
 	$commit = $desc['commit_short'] ?? $desc['commit'];
233 233
 	if ($desc['branch']) {
234
-		$commit = $desc['branch'] . ': ' . $commit;
234
+		$commit = $desc['branch'].': '.$commit;
235 235
 	}
236 236
 	return "{$desc['vcs']} [$commit]";
237 237
 }
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
 	}
251 251
 
252 252
 	// version installee par GIT
253
-	if (lire_fichier($dir . '/.git/HEAD', $c)) {
253
+	if (lire_fichier($dir.'/.git/HEAD', $c)) {
254 254
 		$currentHead = trim(substr($c, 4));
255
-		if (lire_fichier($dir . '/.git/' . $currentHead, $hash)) {
255
+		if (lire_fichier($dir.'/.git/'.$currentHead, $hash)) {
256 256
 			return [
257 257
 				'vcs' => 'GIT',
258 258
 				'branch' => basename($currentHead),
@@ -267,12 +267,12 @@  discard block
 block discarded – undo
267 267
 
268 268
 // La matrice est necessaire pour ne filtrer _que_ des fonctions definies dans filtres_images
269 269
 // et laisser passer les fonctions personnelles baptisees image_...
270
-$GLOBALS['spip_matrice']['image_graver'] = true;//'inc/filtres_images_mini.php';
271
-$GLOBALS['spip_matrice']['image_select'] = true;//'inc/filtres_images_mini.php';
272
-$GLOBALS['spip_matrice']['image_reduire'] = true;//'inc/filtres_images_mini.php';
273
-$GLOBALS['spip_matrice']['image_reduire_par'] = true;//'inc/filtres_images_mini.php';
274
-$GLOBALS['spip_matrice']['image_passe_partout'] = true;//'inc/filtres_images_mini.php';
275
-$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true;//'inc/filtres_images_mini.php';
270
+$GLOBALS['spip_matrice']['image_graver'] = true; //'inc/filtres_images_mini.php';
271
+$GLOBALS['spip_matrice']['image_select'] = true; //'inc/filtres_images_mini.php';
272
+$GLOBALS['spip_matrice']['image_reduire'] = true; //'inc/filtres_images_mini.php';
273
+$GLOBALS['spip_matrice']['image_reduire_par'] = true; //'inc/filtres_images_mini.php';
274
+$GLOBALS['spip_matrice']['image_passe_partout'] = true; //'inc/filtres_images_mini.php';
275
+$GLOBALS['spip_matrice']['image_recadre_avec_fallback'] = true; //'inc/filtres_images_mini.php';
276 276
 
277 277
 $GLOBALS['spip_matrice']['couleur_html_to_hex'] = 'inc/filtres_images_mini.php';
278 278
 $GLOBALS['spip_matrice']['couleur_hex_to_hsl'] = 'inc/filtres_images_mini.php';
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
  */
432 432
 function filtre_debug($val, $key = null) {
433 433
 	$debug = (
434
-		is_null($key) ? '' : (var_export($key, true) . ' = ')
435
-		) . var_export($val, true);
434
+		is_null($key) ? '' : (var_export($key, true).' = ')
435
+		).var_export($val, true);
436 436
 
437 437
 	include_spip('inc/autoriser');
438 438
 	if (autoriser('webmestre')) {
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 		$is_file = false;
489 489
 	}
490 490
 	if ($is_file) {
491
-		$is_local_file = function ($path) {
491
+		$is_local_file = function($path) {
492 492
 			if (strpos($path, '?') !== false) {
493 493
 				$path = supprimer_timestamp($path);
494 494
 				// remove ?24px added by find_in_theme on .svg files
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
 					if ($mouseover = extraire_attribut($reduit, 'onmouseover')) {
538 538
 						if (preg_match(",this[.]src=['\"]([^'\"]+)['\"],ims", $mouseover, $match)) {
539 539
 							$srcover = $match[1];
540
-							$srcover_filter = $filtre("<img src='" . $match[1] . "' />", ...$args);
540
+							$srcover_filter = $filtre("<img src='".$match[1]."' />", ...$args);
541 541
 							$srcover_filter = extraire_attribut($srcover_filter, 'src');
542 542
 							$reduit = str_replace($srcover, $srcover_filter, $reduit);
543 543
 						}
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
 	// " -> &quot; et tout ce genre de choses
943 943
 	$u = $GLOBALS['meta']['pcre_u'];
944 944
 	$texte = str_replace('&nbsp;', ' ', $texte);
945
-	$texte = preg_replace('/\s{2,}/S' . $u, ' ', $texte);
945
+	$texte = preg_replace('/\s{2,}/S'.$u, ' ', $texte);
946 946
 	// ne pas echapper les sinqle quotes car certains outils de syndication gerent mal
947 947
 	$texte = entites_html($texte, false, false);
948 948
 	// mais bien echapper les double quotes !
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
 		return '';
1005 1005
 	}
1006 1006
 	return preg_replace(
1007
-		',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S',
1007
+		',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S',
1008 1008
 		'',
1009 1009
 		$texte
1010 1010
 	);
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 	if (
1034 1034
 		$texte and
1035 1035
 		preg_match(
1036
-			',^[[:space:]]*([0-9]+)([.)]|' . chr(194) . '?' . chr(176) . ')[[:space:]]+,S',
1036
+			',^[[:space:]]*([0-9]+)([.)]|'.chr(194).'?'.chr(176).')[[:space:]]+,S',
1037 1037
 			$texte,
1038 1038
 			$regs
1039 1039
 		)
@@ -1124,8 +1124,8 @@  discard block
 block discarded – undo
1124 1124
  **/
1125 1125
 function textebrut($texte) {
1126 1126
 	$u = $GLOBALS['meta']['pcre_u'];
1127
-	$texte = preg_replace('/\s+/S' . $u, ' ', $texte);
1128
-	$texte = preg_replace('/<(p|br)( [^>]*)?' . '>/iS', "\n\n", $texte);
1127
+	$texte = preg_replace('/\s+/S'.$u, ' ', $texte);
1128
+	$texte = preg_replace('/<(p|br)( [^>]*)?'.'>/iS', "\n\n", $texte);
1129 1129
 	$texte = preg_replace("/^\n+/", '', $texte);
1130 1130
 	$texte = preg_replace("/\n+$/", '', $texte);
1131 1131
 	$texte = preg_replace("/\n +/", "\n", $texte);
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
 		)
1160 1160
 	) {
1161 1161
 		foreach ($liens[0] as $a) {
1162
-			$rel = 'noopener noreferrer ' . extraire_attribut($a, 'rel');
1162
+			$rel = 'noopener noreferrer '.extraire_attribut($a, 'rel');
1163 1163
 			$ablank = inserer_attribut($a, 'rel', $rel);
1164 1164
 			$ablank = inserer_attribut($ablank, 'target', '_blank');
1165 1165
 			$texte = str_replace($a, $ablank, $texte);
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
 		foreach ($regs[0] as $a) {
1185 1185
 			$rel = extraire_attribut($a, 'rel') ?? '';
1186 1186
 			if (strpos($rel, 'nofollow') === false) {
1187
-				$rel = 'nofollow' . ($rel ? " $rel" : '');
1187
+				$rel = 'nofollow'.($rel ? " $rel" : '');
1188 1188
 				$anofollow = inserer_attribut($a, 'rel', $rel);
1189 1189
 				$texte = str_replace($a, $anofollow, $texte);
1190 1190
 			}
@@ -1213,7 +1213,7 @@  discard block
 block discarded – undo
1213 1213
 	$u = $GLOBALS['meta']['pcre_u'];
1214 1214
 	$texte = preg_replace('@</p>@iS', "\n", $texte);
1215 1215
 	$texte = preg_replace("@<p\b.*>@UiS", '<br />', $texte);
1216
-	$texte = preg_replace('@^\s*<br />@S' . $u, '', $texte);
1216
+	$texte = preg_replace('@^\s*<br />@S'.$u, '', $texte);
1217 1217
 
1218 1218
 	return $texte;
1219 1219
 }
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
 		return $texte;
1245 1245
 	}
1246 1246
 	include_spip('inc/texte');
1247
-	$tag = preg_match(',</?(' . _BALISES_BLOCS . ')[>[:space:]],iS', $texte) ?
1247
+	$tag = preg_match(',</?('._BALISES_BLOCS.')[>[:space:]],iS', $texte) ?
1248 1248
 		'div' : 'span';
1249 1249
 
1250 1250
 	return "<$tag style='word-wrap:break-word;'>$texte</$tag>";
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
 
1336 1336
 		// Calcul de la taille et choix de l'unité
1337 1337
 		$affichage = _T(
1338
-			'spip:taille_' . $unites[$puissance] . $suffixe_item,
1338
+			'spip:taille_'.$unites[$puissance].$suffixe_item,
1339 1339
 			[
1340 1340
 				'taille' => round($octets / pow($kilo, $puissance), $precisions[$puissance])
1341 1341
 			]
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
 	}
1370 1370
 	$u = $GLOBALS['meta']['pcre_u'];
1371 1371
 	if ($textebrut) {
1372
-		$texte = preg_replace([",\n,", ',\s(?=\s),msS' . $u], [' ', ''], textebrut($texte));
1372
+		$texte = preg_replace([",\n,", ',\s(?=\s),msS'.$u], [' ', ''], textebrut($texte));
1373 1373
 	}
1374 1374
 	$texte = texte_backend($texte);
1375 1375
 	$texte = str_replace(["'", '"'], ['&#039;', '&#034;'], $texte);
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
 	# un message pour abs_url
1405 1405
 	$GLOBALS['mode_abs_url'] = 'url';
1406 1406
 	$url = trim($url);
1407
-	$r = ',^(?:' . _PROTOCOLES_STD . '):?/?/?$,iS';
1407
+	$r = ',^(?:'._PROTOCOLES_STD.'):?/?/?$,iS';
1408 1408
 
1409 1409
 	return preg_match($r, $url) ? '' : ($entites ? entites_html($url) : $url);
1410 1410
 }
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
 
1611 1611
 	$debut = '';
1612 1612
 	$suite = $texte;
1613
-	while ($t = strpos('-' . $suite, "\n", 1)) {
1613
+	while ($t = strpos('-'.$suite, "\n", 1)) {
1614 1614
 		$debut .= substr($suite, 0, $t - 1);
1615 1615
 		$suite = substr($suite, $t);
1616 1616
 		$car = substr($suite, 0, 1);
@@ -1628,7 +1628,7 @@  discard block
 block discarded – undo
1628 1628
 			$suite = substr($suite, strlen($regs[0]));
1629 1629
 		}
1630 1630
 	}
1631
-	$texte = $debut . $suite;
1631
+	$texte = $debut.$suite;
1632 1632
 
1633 1633
 	if ($collecteurModeles) {
1634 1634
 		$texte = $collecteurModeles->retablir($texte);
@@ -1636,7 +1636,7 @@  discard block
 block discarded – undo
1636 1636
 
1637 1637
 	$texte = echappe_retour($texte);
1638 1638
 
1639
-	return $texte . $fin;
1639
+	return $texte.$fin;
1640 1640
 }
1641 1641
 
1642 1642
 
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
 	if (is_array($balise)) {
1913 1913
 		array_walk(
1914 1914
 			$balise,
1915
-			function (&$a, $key, $t) {
1915
+			function(&$a, $key, $t) {
1916 1916
 				$a = extraire_attribut($a, $t);
1917 1917
 			},
1918 1918
 			$attribut
@@ -2010,14 +2010,14 @@  discard block
 block discarded – undo
2010 2010
 
2011 2011
 	if ($old !== null) {
2012 2012
 		// Remplacer l'ancien attribut du meme nom
2013
-		$balise = $r[1] . $insert . $r[5];
2013
+		$balise = $r[1].$insert.$r[5];
2014 2014
 	} else {
2015 2015
 		// preferer une balise " />" (comme <img />)
2016 2016
 		if (preg_match(',/>,', $balise)) {
2017
-			$balise = preg_replace(',\s?/>,S', $insert . ' />', $balise, 1);
2017
+			$balise = preg_replace(',\s?/>,S', $insert.' />', $balise, 1);
2018 2018
 		} // sinon une balise <a ...> ... </a>
2019 2019
 		else {
2020
-			$balise = preg_replace(',\s?>,S', $insert . '>', $balise, 1);
2020
+			$balise = preg_replace(',\s?>,S', $insert.'>', $balise, 1);
2021 2021
 		}
2022 2022
 	}
2023 2023
 
@@ -2072,7 +2072,7 @@  discard block
 block discarded – undo
2072 2072
 		if (
2073 2073
 			$class_courante
2074 2074
 			and str_contains($class_courante, (string) $c)
2075
-			and preg_match('/(^|\s)' . preg_quote($c) . '($|\s)/', $class_courante)
2075
+			and preg_match('/(^|\s)'.preg_quote($c).'($|\s)/', $class_courante)
2076 2076
 		) {
2077 2077
 			$is_class_presente = true;
2078 2078
 		}
@@ -2080,12 +2080,12 @@  discard block
 block discarded – undo
2080 2080
 			in_array($operation, ['ajouter', 'commuter'])
2081 2081
 			and !$is_class_presente
2082 2082
 		) {
2083
-			$class_new = ltrim(rtrim($class_new ?? '') . ' ' . $c);
2083
+			$class_new = ltrim(rtrim($class_new ?? '').' '.$c);
2084 2084
 		} elseif (
2085 2085
 			in_array($operation, ['supprimer', 'commuter'])
2086 2086
 			and $is_class_presente
2087 2087
 		) {
2088
-			$class_new = trim(preg_replace('/(^|\s)' . preg_quote($c) . '($|\s)/', "\\1", $class_new));
2088
+			$class_new = trim(preg_replace('/(^|\s)'.preg_quote($c).'($|\s)/', "\\1", $class_new));
2089 2089
 		}
2090 2090
 	}
2091 2091
 
@@ -2148,7 +2148,7 @@  discard block
 block discarded – undo
2148 2148
 // Quelques fonctions de calcul arithmetique
2149 2149
 //
2150 2150
 function floatstr($a) {
2151
- return str_replace(',', '.', (string)floatval($a));
2151
+ return str_replace(',', '.', (string) floatval($a));
2152 2152
 }
2153 2153
 function strize($f, $a, $b) {
2154 2154
  return floatstr($f(floatstr($a), floatstr($b)));
@@ -2289,13 +2289,13 @@  discard block
 block discarded – undo
2289 2289
 	if (!defined('_TAGS_NOM_AUTEUR')) {
2290 2290
 		define('_TAGS_NOM_AUTEUR', '');
2291 2291
 	}
2292
-	$tags_acceptes = array_unique(explode(',', 'multi,' . _TAGS_NOM_AUTEUR));
2292
+	$tags_acceptes = array_unique(explode(',', 'multi,'._TAGS_NOM_AUTEUR));
2293 2293
 	foreach ($tags_acceptes as $tag) {
2294 2294
 		if (strlen($tag)) {
2295
-			$remp1[] = '<' . trim($tag) . '>';
2296
-			$remp1[] = '</' . trim($tag) . '>';
2297
-			$remp2[] = '\x60' . trim($tag) . '\x61';
2298
-			$remp2[] = '\x60/' . trim($tag) . '\x61';
2295
+			$remp1[] = '<'.trim($tag).'>';
2296
+			$remp1[] = '</'.trim($tag).'>';
2297
+			$remp2[] = '\x60'.trim($tag).'\x61';
2298
+			$remp2[] = '\x60/'.trim($tag).'\x61';
2299 2299
 		}
2300 2300
 	}
2301 2301
 	$v_nom = str_replace($remp2, $remp1, supprimer_tags(str_replace($remp1, $remp2, $nom)));
@@ -2415,10 +2415,10 @@  discard block
 block discarded – undo
2415 2415
 	$fichier = basename($url);
2416 2416
 
2417 2417
 	return '<a rel="enclosure"'
2418
-	. ($url ? ' href="' . spip_htmlspecialchars($url) . '"' : '')
2419
-	. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2420
-	. ($length ? ' title="' . spip_htmlspecialchars($length) . '"' : '')
2421
-	. '>' . $fichier . '</a>';
2418
+	. ($url ? ' href="'.spip_htmlspecialchars($url).'"' : '')
2419
+	. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2420
+	. ($length ? ' title="'.spip_htmlspecialchars($length).'"' : '')
2421
+	. '>'.$fichier.'</a>';
2422 2422
 }
2423 2423
 
2424 2424
 /**
@@ -2446,9 +2446,9 @@  discard block
 block discarded – undo
2446 2446
 			} # vieux data
2447 2447
 			$fichier = basename($url);
2448 2448
 			$enclosures[] = '<enclosure'
2449
-				. ($url ? ' url="' . spip_htmlspecialchars($url) . '"' : '')
2450
-				. ($type ? ' type="' . spip_htmlspecialchars($type) . '"' : '')
2451
-				. ($length ? ' length="' . $length . '"' : '')
2449
+				. ($url ? ' url="'.spip_htmlspecialchars($url).'"' : '')
2450
+				. ($type ? ' type="'.spip_htmlspecialchars($type).'"' : '')
2451
+				. ($length ? ' length="'.$length.'"' : '')
2452 2452
 				. ' />';
2453 2453
 		}
2454 2454
 	}
@@ -2474,7 +2474,7 @@  discard block
 block discarded – undo
2474 2474
 		if (extraire_attribut($e, 'rel') == 'tag') {
2475 2475
 			$subjects .= '<dc:subject>'
2476 2476
 				. texte_backend(textebrut($e))
2477
-				. '</dc:subject>' . "\n";
2477
+				. '</dc:subject>'."\n";
2478 2478
 		}
2479 2479
 	}
2480 2480
 
@@ -2510,7 +2510,7 @@  discard block
 block discarded – undo
2510 2510
 	if (is_array($texte)) {
2511 2511
 		array_walk(
2512 2512
 			$texte,
2513
-			function (&$a, $key, $t) {
2513
+			function(&$a, $key, $t) {
2514 2514
 				$a = extraire_balise($a, $t);
2515 2515
 			},
2516 2516
 			$tag
@@ -2558,7 +2558,7 @@  discard block
 block discarded – undo
2558 2558
 	if (is_array($texte)) {
2559 2559
 		array_walk(
2560 2560
 			$texte,
2561
-			function (&$a, $key, $t) {
2561
+			function(&$a, $key, $t) {
2562 2562
 				$a = extraire_balises($a, $t);
2563 2563
 			},
2564 2564
 			$tag
@@ -2691,7 +2691,7 @@  discard block
 block discarded – undo
2691 2691
 		if ($fond != '404') {
2692 2692
 			$contexte = array_shift($p);
2693 2693
 			$contexte['page'] = $fond;
2694
-			$action = preg_replace('/([?]' . preg_quote($fond) . '[^&=]*[0-9]+)(&|$)/', '?&', $action);
2694
+			$action = preg_replace('/([?]'.preg_quote($fond).'[^&=]*[0-9]+)(&|$)/', '?&', $action);
2695 2695
 		}
2696 2696
 	}
2697 2697
 	// defaire ce qu'a injecte urls_decoder_url : a revoir en modifiant la signature de urls_decoder_url
@@ -2746,9 +2746,9 @@  discard block
 block discarded – undo
2746 2746
 			. '"'
2747 2747
 			. (is_null($val)
2748 2748
 				? ''
2749
-				: ' value="' . entites_html($val) . '"'
2749
+				: ' value="'.entites_html($val).'"'
2750 2750
 			)
2751
-			. ' type="hidden"' . "\n/>";
2751
+			. ' type="hidden"'."\n/>";
2752 2752
 	}
2753 2753
 
2754 2754
 	return join('', $hidden);
@@ -2858,7 +2858,7 @@  discard block
 block discarded – undo
2858 2858
 
2859 2859
 	return preg_replace_callback(
2860 2860
 		",url\s*\(\s*['\"]?([^'\"/#\s][^:]*)['\"]?\s*\),Uims",
2861
-		fn($x) => "url('" . suivre_lien($path, $x[1]) . "')",
2861
+		fn($x) => "url('".suivre_lien($path, $x[1])."')",
2862 2862
 		$contenu
2863 2863
 	);
2864 2864
 }
@@ -2919,14 +2919,14 @@  discard block
 block discarded – undo
2919 2919
 	) {
2920 2920
 		$distant = true;
2921 2921
 		$cssf = parse_url($css);
2922
-		$cssf = $cssf['path'] . ($cssf['query'] ? '?' . $cssf['query'] : '');
2922
+		$cssf = $cssf['path'].($cssf['query'] ? '?'.$cssf['query'] : '');
2923 2923
 		$cssf = preg_replace(',[?:&=],', '_', $cssf);
2924 2924
 	} else {
2925 2925
 		$distant = false;
2926 2926
 		$cssf = $css;
2927 2927
 		// 1. regarder d'abord si un fichier avec la bonne direction n'est pas aussi
2928 2928
 		//propose (rien a faire dans ce cas)
2929
-		$f = preg_replace(',(_rtl)?\.css$,i', '_' . $ndir . '.css', $css);
2929
+		$f = preg_replace(',(_rtl)?\.css$,i', '_'.$ndir.'.css', $css);
2930 2930
 		if (@file_exists($f)) {
2931 2931
 			return $f;
2932 2932
 		}
@@ -2936,7 +2936,7 @@  discard block
 block discarded – undo
2936 2936
 	$dir_var = sous_repertoire(_DIR_VAR, 'cache-css');
2937 2937
 	$f = $dir_var
2938 2938
 		. preg_replace(',.*/(.*?)(_rtl)?\.css,', '\1', $cssf)
2939
-		. '.' . substr(md5($cssf), 0, 4) . '_' . $ndir . '.css';
2939
+		. '.'.substr(md5($cssf), 0, 4).'_'.$ndir.'.css';
2940 2940
 
2941 2941
 	// la css peut etre distante (url absolue !)
2942 2942
 	if ($distant) {
@@ -2982,8 +2982,8 @@  discard block
 block discarded – undo
2982 2982
 		} // si la css_direction commence par $dir_var on la fait passer pour une absolue
2983 2983
 		elseif (substr($css_direction, 0, strlen($dir_var)) == $dir_var) {
2984 2984
 			$css_direction = substr($css_direction, strlen($dir_var));
2985
-			$src_faux_abs['/@@@@@@/' . $css_direction] = $css_direction;
2986
-			$css_direction = '/@@@@@@/' . $css_direction;
2985
+			$src_faux_abs['/@@@@@@/'.$css_direction] = $css_direction;
2986
+			$css_direction = '/@@@@@@/'.$css_direction;
2987 2987
 		}
2988 2988
 		$src[] = $regs[0][$k];
2989 2989
 		$src_direction_css[] = str_replace($import_css, $css_direction, $regs[0][$k]);
@@ -3032,7 +3032,7 @@  discard block
 block discarded – undo
3032 3032
 
3033 3033
 	$f = basename($css, '.css');
3034 3034
 	$f = sous_repertoire(_DIR_VAR, 'cache-css')
3035
-		. preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-" . substr(md5("$css-urlabs"), 0, 4) . "\\2", $f)
3035
+		. preg_replace(',(.*?)(_rtl|_ltr)?$,', "\\1-urlabs-".substr(md5("$css-urlabs"), 0, 4)."\\2", $f)
3036 3036
 		. '.css';
3037 3037
 
3038 3038
 	if ((@filemtime($f) > @filemtime($css)) and (_VAR_MODE != 'recalcul')) {
@@ -3042,7 +3042,7 @@  discard block
 block discarded – undo
3042 3042
 	if ($url_absolue_css == $css) {
3043 3043
 		if (
3044 3044
 			strncmp($GLOBALS['meta']['adresse_site'], $css, $l = strlen($GLOBALS['meta']['adresse_site'])) != 0
3045
-			or !lire_fichier(_DIR_RACINE . substr($css, $l), $contenu)
3045
+			or !lire_fichier(_DIR_RACINE.substr($css, $l), $contenu)
3046 3046
 		) {
3047 3047
 			include_spip('inc/distant');
3048 3048
 			$contenu = recuperer_url($css);
@@ -3154,7 +3154,7 @@  discard block
 block discarded – undo
3154 3154
 	$expression = str_replace('\/', '/', $expression);
3155 3155
 	$expression = str_replace('/', '\/', $expression);
3156 3156
 
3157
-	if (preg_match('/' . $expression . '/' . $modif, $texte ?? '', $r)) {
3157
+	if (preg_match('/'.$expression.'/'.$modif, $texte ?? '', $r)) {
3158 3158
 		if (isset($r[$capte])) {
3159 3159
 			return $r[$capte];
3160 3160
 		} else {
@@ -3196,7 +3196,7 @@  discard block
 block discarded – undo
3196 3196
 	$expression = str_replace('\/', '/', $expression);
3197 3197
 	$expression = str_replace('/', '\/', $expression);
3198 3198
 
3199
-	return (string) preg_replace('/' . $expression . '/' . $modif, $replace, $texte);
3199
+	return (string) preg_replace('/'.$expression.'/'.$modif, $replace, $texte);
3200 3200
 }
3201 3201
 
3202 3202
 
@@ -3215,7 +3215,7 @@  discard block
 block discarded – undo
3215 3215
 function traiter_doublons_documents(&$doublons, $letexte) {
3216 3216
 
3217 3217
 	// Verifier dans le texte & les notes (pas beau, helas)
3218
-	$t = $letexte . $GLOBALS['les_notes'];
3218
+	$t = $letexte.$GLOBALS['les_notes'];
3219 3219
 
3220 3220
 	if (
3221 3221
 		strstr($t, 'spip_document_') // evite le preg_match_all si inutile
@@ -3229,7 +3229,7 @@  discard block
 block discarded – undo
3229 3229
 		if (!isset($doublons['documents'])) {
3230 3230
 			$doublons['documents'] = '';
3231 3231
 		}
3232
-		$doublons['documents'] .= ',' . join(',', $matches[1]);
3232
+		$doublons['documents'] .= ','.join(',', $matches[1]);
3233 3233
 	}
3234 3234
 
3235 3235
 	return $letexte;
@@ -3286,7 +3286,7 @@  discard block
 block discarded – undo
3286 3286
 	if ($env) {
3287 3287
 		foreach ($env as $i => $j) {
3288 3288
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3289
-				$texte .= "<param name='" . attribut_html($i) . "'\n\tvalue='" . attribut_html($j) . "' />";
3289
+				$texte .= "<param name='".attribut_html($i)."'\n\tvalue='".attribut_html($j)."' />";
3290 3290
 			}
3291 3291
 		}
3292 3292
 	}
@@ -3325,7 +3325,7 @@  discard block
 block discarded – undo
3325 3325
 	if ($env) {
3326 3326
 		foreach ($env as $i => $j) {
3327 3327
 			if (is_string($j) and !in_array($i, $ignore_params)) {
3328
-				$texte .= attribut_html($i) . "='" . attribut_html($j) . "' ";
3328
+				$texte .= attribut_html($i)."='".attribut_html($j)."' ";
3329 3329
 			}
3330 3330
 		}
3331 3331
 	}
@@ -3399,10 +3399,10 @@  discard block
 block discarded – undo
3399 3399
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
3400 3400
 	if (
3401 3401
 		preg_match(',-(\d+)[.](png|gif|svg)$,', $img_file, $m)
3402
-		and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])) . '-xx.svg'
3402
+		and $variante_svg_generique = substr($img_file, 0, -strlen($m[0])).'-xx.svg'
3403 3403
 		and file_exists($variante_svg_generique)
3404 3404
 	) {
3405
-		if ($variante_svg_size = substr($variante_svg_generique, 0, -6) . $m[1] . '.svg' and file_exists($variante_svg_size)) {
3405
+		if ($variante_svg_size = substr($variante_svg_generique, 0, -6).$m[1].'.svg' and file_exists($variante_svg_size)) {
3406 3406
 			$img_file = $variante_svg_size;
3407 3407
 		}
3408 3408
 		else {
@@ -3460,7 +3460,7 @@  discard block
 block discarded – undo
3460 3460
 				return '';
3461 3461
 			}
3462 3462
 		}
3463
-		$atts .= " width='" . $largeur . "' height='" . $hauteur . "'";
3463
+		$atts .= " width='".$largeur."' height='".$hauteur."'";
3464 3464
 	}
3465 3465
 
3466 3466
 	if (file_exists($img_file)) {
@@ -3470,14 +3470,14 @@  discard block
 block discarded – undo
3470 3470
 		$alt = '';
3471 3471
 	}
3472 3472
 	elseif ($alt or $alt === '') {
3473
-		$alt = " alt='" . attribut_html($alt) . "'";
3473
+		$alt = " alt='".attribut_html($alt)."'";
3474 3474
 	}
3475 3475
 	else {
3476
-		$alt = " alt='" . attribut_html($title) . "'";
3476
+		$alt = " alt='".attribut_html($title)."'";
3477 3477
 	}
3478
-	return "<img src='" . attribut_html($img_file) . "'$alt"
3479
-	. ($title ? ' title="' . attribut_html($title) . '"' : '')
3480
-	. ' ' . ltrim($atts)
3478
+	return "<img src='".attribut_html($img_file)."'$alt"
3479
+	. ($title ? ' title="'.attribut_html($title).'"' : '')
3480
+	. ' '.ltrim($atts)
3481 3481
 	. ' />';
3482 3482
 }
3483 3483
 
@@ -3491,10 +3491,10 @@  discard block
 block discarded – undo
3491 3491
  */
3492 3492
 function http_style_background($img, $att = '', $size = null) {
3493 3493
 	if ($size and is_numeric($size)) {
3494
-		$size = trim($size) . 'px';
3494
+		$size = trim($size).'px';
3495 3495
 	}
3496
-	return " style='background" .
3497
-		($att ? '' : '-image') . ': url("' . chemin_image($img) . '")' . ($att ? (' ' . $att) : '') . ';'
3496
+	return " style='background".
3497
+		($att ? '' : '-image').': url("'.chemin_image($img).'")'.($att ? (' '.$att) : '').';'
3498 3498
 		. ($size ? "background-size:{$size};" : '')
3499 3499
 		. "'";
3500 3500
 }
@@ -3609,7 +3609,7 @@  discard block
 block discarded – undo
3609 3609
 		$img = http_img_pack(
3610 3610
 			$img,
3611 3611
 			$alt,
3612
-			$class ? " class='" . attribut_html($class) . "'" : '',
3612
+			$class ? " class='".attribut_html($class)."'" : '',
3613 3613
 			'',
3614 3614
 			['chemin_image' => false, 'utiliser_suffixe_size' => false]
3615 3615
 		);
@@ -3694,7 +3694,7 @@  discard block
 block discarded – undo
3694 3694
 	$balise_svg_source = $balise_svg;
3695 3695
 
3696 3696
 	// entete XML à supprimer
3697
-	$svg = preg_replace(',^\s*<\?xml[^>]*\?' . '>,', '', $svg);
3697
+	$svg = preg_replace(',^\s*<\?xml[^>]*\?'.'>,', '', $svg);
3698 3698
 
3699 3699
 	// IE est toujours mon ami
3700 3700
 	$balise_svg = inserer_attribut($balise_svg, 'focusable', 'false');
@@ -3712,9 +3712,9 @@  discard block
 block discarded – undo
3712 3712
 	// regler le alt
3713 3713
 	if ($alt) {
3714 3714
 		$balise_svg = inserer_attribut($balise_svg, 'role', 'img');
3715
-		$id = 'img-svg-title-' . substr(md5("$img_file:$svg:$alt"), 0, 4);
3715
+		$id = 'img-svg-title-'.substr(md5("$img_file:$svg:$alt"), 0, 4);
3716 3716
 		$balise_svg = inserer_attribut($balise_svg, 'aria-labelledby', $id);
3717
-		$title = "<title id=\"$id\">" . entites_html($alt) . "</title>\n";
3717
+		$title = "<title id=\"$id\">".entites_html($alt)."</title>\n";
3718 3718
 		$balise_svg .= $title;
3719 3719
 	}
3720 3720
 	else {
@@ -3762,7 +3762,7 @@  discard block
 block discarded – undo
3762 3762
 	if (is_array($tableau)) {
3763 3763
 		foreach ($tableau as $k => $v) {
3764 3764
 			$res = recuperer_fond(
3765
-				'modeles/' . $modele,
3765
+				'modeles/'.$modele,
3766 3766
 				array_merge(['cle' => $k], (is_array($v) ? $v : ['valeur' => $v]))
3767 3767
 			);
3768 3768
 			$texte .= $res;
@@ -3947,7 +3947,7 @@  discard block
 block discarded – undo
3947 3947
 	}
3948 3948
 
3949 3949
 	$c = serialize($c);
3950
-	$cle = calculer_cle_action($form . $c);
3950
+	$cle = calculer_cle_action($form.$c);
3951 3951
 	$c = "$cle:$c";
3952 3952
 
3953 3953
 	// on ne stocke pas les contextes dans des fichiers en cache
@@ -4005,15 +4005,15 @@  discard block
 block discarded – undo
4005 4005
 	}
4006 4006
 	// toujours encoder l'url source dans le bloc ajax
4007 4007
 	$r = self();
4008
-	$r = ' data-origin="' . $r . '"';
4008
+	$r = ' data-origin="'.$r.'"';
4009 4009
 	$class = 'ajaxbloc';
4010 4010
 	if ($ajaxid and is_string($ajaxid)) {
4011 4011
 		// ajaxid est normalement conforme a un nom de classe css
4012 4012
 		// on ne verifie pas la conformite, mais on passe entites_html par dessus par precaution
4013
-		$class .= ' ajax-id-' . entites_html($ajaxid);
4013
+		$class .= ' ajax-id-'.entites_html($ajaxid);
4014 4014
 	}
4015 4015
 
4016
-	return "<div class='$class' " . "data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
4016
+	return "<div class='$class' "."data-ajax-env='$env'$r>\n$emboite</div><!--ajaxbloc-->\n";
4017 4017
 }
4018 4018
 
4019 4019
 /**
@@ -4057,7 +4057,7 @@  discard block
 block discarded – undo
4057 4057
 		$cle = substr($c, 0, $p);
4058 4058
 		$c = substr($c, $p + 1);
4059 4059
 
4060
-		if ($cle == calculer_cle_action($form . $c)) {
4060
+		if ($cle == calculer_cle_action($form.$c)) {
4061 4061
 			$env = @unserialize($c);
4062 4062
 			return $env;
4063 4063
 		}
@@ -4178,13 +4178,13 @@  discard block
 block discarded – undo
4178 4178
 				}
4179 4179
 			}
4180 4180
 		}
4181
-		$att .= 'class="' . ($class ? attribut_html($class) . ' ' : '') . (defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on') . '"';
4181
+		$att .= 'class="'.($class ? attribut_html($class).' ' : '').(defined('_LIEN_OU_EXPOSE_CLASS_ON') ? _LIEN_OU_EXPOSE_CLASS_ON : 'on').'"';
4182 4182
 	} else {
4183 4183
 		$bal = 'a';
4184 4184
 		$att = "href='$url'"
4185
-			. ($title ? " title='" . attribut_html($title) . "'" : '')
4186
-			. ($class ? " class='" . attribut_html($class) . "'" : '')
4187
-			. ($rel ? " rel='" . attribut_html($rel) . "'" : '')
4185
+			. ($title ? " title='".attribut_html($title)."'" : '')
4186
+			. ($class ? " class='".attribut_html($class)."'" : '')
4187
+			. ($rel ? " rel='".attribut_html($rel)."'" : '')
4188 4188
 			. $evt;
4189 4189
 	}
4190 4190
 	if ($libelle === null) {
@@ -4323,7 +4323,7 @@  discard block
 block discarded – undo
4323 4323
 
4324 4324
 	// Icône
4325 4325
 	$icone = http_img_pack($fond, $alt, "width='$size' height='$size'");
4326
-	$icone = '<span class="icone-image' . ($fonction ? " icone-fonction icone-fonction-$fonction" : '') . "\">$icone</span>";
4326
+	$icone = '<span class="icone-image'.($fonction ? " icone-fonction icone-fonction-$fonction" : '')."\">$icone</span>";
4327 4327
 
4328 4328
 	// Markup final
4329 4329
 	if ($type == 'lien') {
@@ -4598,20 +4598,20 @@  discard block
 block discarded – undo
4598 4598
 		$class_form = 'ajax';
4599 4599
 		$class = str_replace('ajax', '', $class);
4600 4600
 	}
4601
-	$class_btn = 'submit ' . trim($class);
4601
+	$class_btn = 'submit '.trim($class);
4602 4602
 
4603 4603
 	if ($confirm) {
4604
-		$confirm = 'confirm("' . attribut_html($confirm) . '")';
4604
+		$confirm = 'confirm("'.attribut_html($confirm).'")';
4605 4605
 		if ($callback) {
4606 4606
 			$callback = "$confirm?($callback):false";
4607 4607
 		} else {
4608 4608
 			$callback = $confirm;
4609 4609
 		}
4610 4610
 	}
4611
-	$onclick = $callback ? " onclick='return " . addcslashes($callback, "'") . "'" : '';
4611
+	$onclick = $callback ? " onclick='return ".addcslashes($callback, "'")."'" : '';
4612 4612
 	$title = $title ? " title='$title'" : '';
4613 4613
 
4614
-	return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>" . form_hidden($url)
4614
+	return "<form class='bouton_action_post $class_form' method='post' action='$url'><div>".form_hidden($url)
4615 4615
 	. "<button type='submit' class='$class_btn'$title$onclick>$libelle</button></div></form>";
4616 4616
 }
4617 4617
 
@@ -4676,14 +4676,14 @@  discard block
 block discarded – undo
4676 4676
 		$champ_titre = '';
4677 4677
 		if ($demande_titre) {
4678 4678
 			// si pas de titre declare mais champ titre, il sera peuple par le select *
4679
-			$champ_titre = (!empty($desc['titre'])) ? ', ' . $desc['titre'] : '';
4679
+			$champ_titre = (!empty($desc['titre'])) ? ', '.$desc['titre'] : '';
4680 4680
 		}
4681 4681
 		include_spip('base/abstract_sql');
4682 4682
 		include_spip('base/connect_sql');
4683 4683
 		$objets[$type_objet][$id_objet] = sql_fetsel(
4684
-			'*' . $champ_titre,
4684
+			'*'.$champ_titre,
4685 4685
 			$desc['table_sql'],
4686
-			id_table_objet($type_objet) . ' = ' . intval($id_objet)
4686
+			id_table_objet($type_objet).' = '.intval($id_objet)
4687 4687
 		);
4688 4688
 
4689 4689
 		// Toujours noter la longueur d'introduction, même si pas demandé cette fois-ci
@@ -4776,8 +4776,7 @@  discard block
 block discarded – undo
4776 4776
 	if (isset($ligne_sql['chapo'])) {
4777 4777
 		$chapo = $ligne_sql['chapo'];
4778 4778
 		$texte = strlen($descriptif) ?
4779
-			'' :
4780
-			"$chapo \n\n $texte";
4779
+			'' : "$chapo \n\n $texte";
4781 4780
 	}
4782 4781
 
4783 4782
 	// Longueur en paramètre, sinon celle renseignée dans la description de l'objet, sinon valeur en dur
@@ -4852,7 +4851,7 @@  discard block
 block discarded – undo
4852 4851
 		return $texte;
4853 4852
 	}
4854 4853
 
4855
-	$traitement = str_replace('%s', "'" . texte_script($texte) . "'", $traitement);
4854
+	$traitement = str_replace('%s', "'".texte_script($texte)."'", $traitement);
4856 4855
 
4857 4856
 	// signaler qu'on est dans l'espace prive pour les filtres qui se servent de ce flag
4858 4857
 	if (test_espace_prive()) {
@@ -4891,7 +4890,7 @@  discard block
 block discarded – undo
4891 4890
 	}
4892 4891
 	$url = generer_objet_url($id_objet, $objet, '', '', null, '', $connect);
4893 4892
 
4894
-	return "<a href='$url' class='$objet'>" . couper($titre, $longueur) . '</a>';
4893
+	return "<a href='$url' class='$objet'>".couper($titre, $longueur).'</a>';
4895 4894
 }
4896 4895
 
4897 4896
 /**
@@ -4917,10 +4916,10 @@  discard block
 block discarded – undo
4917 4916
 function wrap($texte, $wrap) {
4918 4917
 	$balises = extraire_balises($wrap);
4919 4918
 	if (preg_match_all(",<([a-z]\w*)\b[^>]*>,UimsS", $wrap, $regs, PREG_PATTERN_ORDER)) {
4920
-		$texte = $wrap . $texte;
4919
+		$texte = $wrap.$texte;
4921 4920
 		$regs = array_reverse($regs[1]);
4922
-		$wrap = '</' . implode('></', $regs) . '>';
4923
-		$texte = $texte . $wrap;
4921
+		$wrap = '</'.implode('></', $regs).'>';
4922
+		$texte = $texte.$wrap;
4924 4923
 	}
4925 4924
 
4926 4925
 	return $texte;
@@ -4951,7 +4950,7 @@  discard block
 block discarded – undo
4951 4950
 
4952 4951
 	// caster $u en array si besoin
4953 4952
 	if (is_object($u)) {
4954
-		$u = (array)$u;
4953
+		$u = (array) $u;
4955 4954
 	}
4956 4955
 
4957 4956
 	if (is_array($u)) {
@@ -4973,7 +4972,7 @@  discard block
 block discarded – undo
4973 4972
 		// sinon on passe a la ligne et on indente
4974 4973
 		$i_str = str_pad('', $indent, ' ');
4975 4974
 		foreach ($u as $k => $v) {
4976
-			$out .= $join . $i_str . "$k: " . filtre_print_dist($v, $join, $indent + 2);
4975
+			$out .= $join.$i_str."$k: ".filtre_print_dist($v, $join, $indent + 2);
4977 4976
 		}
4978 4977
 
4979 4978
 		return $out;
@@ -5027,7 +5026,7 @@  discard block
 block discarded – undo
5027 5026
  * @return string
5028 5027
  */
5029 5028
 function objet_icone($objet, $taille = 24, $class = '') {
5030
-	$icone = objet_info($objet, 'icone_objet') . '-' . $taille . '.png';
5029
+	$icone = objet_info($objet, 'icone_objet').'-'.$taille.'.png';
5031 5030
 	$icone = chemin_image($icone);
5032 5031
 	$balise_img = charger_filtre('balise_img');
5033 5032
 
@@ -5053,7 +5052,7 @@  discard block
 block discarded – undo
5053 5052
  */
5054 5053
 function objet_T($objet, $chaine, $args = [], $options = []) {
5055 5054
 	$chaine = explode(':', $chaine);
5056
-	if ($t = _T($objet . ':' . end($chaine), $args, array_merge($options, ['force' => false]))) {
5055
+	if ($t = _T($objet.':'.end($chaine), $args, array_merge($options, ['force' => false]))) {
5057 5056
 		return $t;
5058 5057
 	}
5059 5058
 	$chaine = implode(':', $chaine);
@@ -5119,7 +5118,7 @@  discard block
 block discarded – undo
5119 5118
 	$cache = recuperer_fond($fond, $contexte, $options, $connect);
5120 5119
 
5121 5120
 	// calculer le nom de la css
5122
-	$dir_var = sous_repertoire(_DIR_VAR, 'cache-' . $extension);
5121
+	$dir_var = sous_repertoire(_DIR_VAR, 'cache-'.$extension);
5123 5122
 	$nom_safe = preg_replace(',\W,', '_', str_replace('.', '_', $fond));
5124 5123
 	$contexte_implicite = calculer_contexte_implicite();
5125 5124
 
@@ -5127,14 +5126,14 @@  discard block
 block discarded – undo
5127 5126
 	// mais on peut hasher selon le contenu a la demande, si plusieurs contextes produisent un meme contenu
5128 5127
 	// reduit la variabilite du nom et donc le nombre de css concatenees possibles in fine
5129 5128
 	if (isset($options['hash_on_content']) and $options['hash_on_content']) {
5130
-		$hash = md5($contexte_implicite['host'] . '::' . $cache);
5129
+		$hash = md5($contexte_implicite['host'].'::'.$cache);
5131 5130
 	}
5132 5131
 	else {
5133 5132
 		unset($contexte_implicite['notes']); // pas pertinent pour signaler un changeemnt de contenu pour des css/js
5134 5133
 		ksort($contexte);
5135
-		$hash = md5($fond . json_encode($contexte_implicite, JSON_THROW_ON_ERROR) . json_encode($contexte, JSON_THROW_ON_ERROR) . $connect);
5134
+		$hash = md5($fond.json_encode($contexte_implicite, JSON_THROW_ON_ERROR).json_encode($contexte, JSON_THROW_ON_ERROR).$connect);
5136 5135
 	}
5137
-	$filename = $dir_var . $extension . "dyn-$nom_safe-" . substr($hash, 0, 8) . ".$extension";
5136
+	$filename = $dir_var.$extension."dyn-$nom_safe-".substr($hash, 0, 8).".$extension";
5138 5137
 
5139 5138
 	// mettre a jour le fichier si il n'existe pas
5140 5139
 	// ou trop ancien
@@ -5142,8 +5141,8 @@  discard block
 block discarded – undo
5142 5141
 	// et recopie sur le fichier cible uniquement si il change
5143 5142
 	if (
5144 5143
 		!file_exists($filename)
5145
-		or !file_exists($filename . '.last')
5146
-		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename . '.last') < $cache['lastmodified'])
5144
+		or !file_exists($filename.'.last')
5145
+		or (isset($cache['lastmodified']) and $cache['lastmodified'] and filemtime($filename.'.last') < $cache['lastmodified'])
5147 5146
 		or (defined('_VAR_MODE') and _VAR_MODE == 'recalcul')
5148 5147
 	) {
5149 5148
 		$contenu = $cache['texte'];
@@ -5167,10 +5166,10 @@  discard block
 block discarded – undo
5167 5166
 			}
5168 5167
 			// pas de date dans le commentaire car sinon ca invalide le md5 et force la maj
5169 5168
 			// mais on peut mettre un md5 du contenu, ce qui donne un aperu rapide si la feuille a change ou non
5170
-			$comment .= "}\n   md5:" . md5($contenu) . " */\n";
5169
+			$comment .= "}\n   md5:".md5($contenu)." */\n";
5171 5170
 		}
5172 5171
 		// et ecrire le fichier si il change
5173
-		ecrire_fichier_calcule_si_modifie($filename, $comment . $contenu, false, true);
5172
+		ecrire_fichier_calcule_si_modifie($filename, $comment.$contenu, false, true);
5174 5173
 	}
5175 5174
 
5176 5175
 	return timestamp($filename);
@@ -5403,7 +5402,7 @@  discard block
 block discarded – undo
5403 5402
 	if ($e > 0 and strlen($mid) > 8) {
5404 5403
 		$mid = '***...***';
5405 5404
 	}
5406
-	return substr($passe, 0, $e) . $mid . ($e > 0 ? substr($passe, -$e) : '');
5405
+	return substr($passe, 0, $e).$mid.($e > 0 ? substr($passe, -$e) : '');
5407 5406
 }
5408 5407
 
5409 5408
 
@@ -5465,7 +5464,7 @@  discard block
 block discarded – undo
5465 5464
 		case 'id':
5466 5465
 		case 'anchor':
5467 5466
 			if (preg_match(',^\d,', $texte)) {
5468
-				$texte = substr($type, 0, 1) . $texte;
5467
+				$texte = substr($type, 0, 1).$texte;
5469 5468
 			}
5470 5469
 	}
5471 5470
 
@@ -5475,9 +5474,9 @@  discard block
 block discarded – undo
5475 5474
 
5476 5475
 	if (strlen($texte) < $longueur_mini and $longueur_mini < $longueur_maxi) {
5477 5476
 		if (preg_match(',^\d,', $texte)) {
5478
-			$texte = ($type ? substr($type, 0, 1) : 's') . $texte;
5477
+			$texte = ($type ? substr($type, 0, 1) : 's').$texte;
5479 5478
 		}
5480
-		$texte .= $separateur . md5($original);
5479
+		$texte .= $separateur.md5($original);
5481 5480
 		$texte = substr($texte, 0, $longueur_mini);
5482 5481
 	}
5483 5482
 
Please login to merge, or discard this patch.