Completed
Push — master ( fce320...054fa9 )
by cam
07:02 queued 02:35
created
ecrire/inc/utils.php 1 patch
Spacing   +130 added lines, -132 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
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		// donc il faut l'inclure "en globals"
186 186
 		if ($f = find_in_path('mes_fonctions.php')) {
187 187
 			global $dossier_squelettes;
188
-			include_once(_ROOT_CWD . $f);
188
+			include_once(_ROOT_CWD.$f);
189 189
 		}
190 190
 
191 191
 		if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 	}
290 290
 
291 291
 	// appliquer notre fonction si elle existe
292
-	$fonc = 'execute_pipeline_' . strtolower($action);
292
+	$fonc = 'execute_pipeline_'.strtolower($action);
293 293
 	if (function_exists($fonc)) {
294 294
 		$val = $fonc($val);
295 295
 	} // plantage ?
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 function spip_log($message = null, $name = null) {
354 354
 	static $pre = array();
355 355
 	static $log;
356
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
356
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
357 357
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
358 358
 		$logname = null;
359 359
 	}
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 		if (!is_string($message)) {
382 382
 			$message = print_r($message, true);
383 383
 		}
384
-		$log($pre[$niveau] . ' ' . $message, $logname);
384
+		$log($pre[$niveau].' '.$message, $logname);
385 385
 	}
386 386
 }
387 387
 
@@ -494,9 +494,9 @@  discard block
 block discarded – undo
494 494
  * @param string $sanitize_function
495 495
  * @return array|mixed|string
496 496
  */
497
-function spip_sanitize_from_request($value, $key, $sanitize_function='entites_html') {
497
+function spip_sanitize_from_request($value, $key, $sanitize_function = 'entites_html') {
498 498
 	if (is_array($value)) {
499
-		if ($key=='*') {
499
+		if ($key == '*') {
500 500
 			$key = array_keys($value);
501 501
 		}
502 502
 		if (!is_array($key)) {
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 		$a = './';
582 582
 	}
583 583
 
584
-	$regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,';
584
+	$regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,';
585 585
 	$ajouts = array_flip(explode('|', $c));
586 586
 	$u = is_array($v) ? $v : rawurlencode($v);
587 587
 	$testv = (is_array($v) ? count($v) : strlen($v));
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 			// Ajout. Pour une variable, remplacer au meme endroit,
609 609
 			// pour un tableau ce sera fait dans la prochaine boucle
610 610
 			elseif (substr($r[1], -2) != '[]') {
611
-				$url[$n] = $r[1] . '=' . $u;
611
+				$url[$n] = $r[1].'='.$u;
612 612
 				unset($ajouts[$r[1]]);
613 613
 			}
614 614
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -628,11 +628,11 @@  discard block
 block discarded – undo
628 628
 	} elseif ($testv) {
629 629
 		foreach ($ajouts as $k => $n) {
630 630
 			if (!is_array($v)) {
631
-				$url[] = $k . '=' . $u;
631
+				$url[] = $k.'='.$u;
632 632
 			} else {
633
-				$id = (substr($k, -2) == '[]') ? $k : ($k . "[]");
633
+				$id = (substr($k, -2) == '[]') ? $k : ($k."[]");
634 634
 				foreach ($v as $w) {
635
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : $w);
635
+					$url[] = $id.'='.(is_array($w) ? 'Array' : $w);
636 636
 				}
637 637
 			}
638 638
 		}
@@ -643,10 +643,10 @@  discard block
 block discarded – undo
643 643
 
644 644
 	// recomposer l'adresse
645 645
 	if ($url) {
646
-		$a .= '?' . join($sep, $url);
646
+		$a .= '?'.join($sep, $url);
647 647
 	}
648 648
 
649
-	return $a . $ancre;
649
+	return $a.$ancre;
650 650
 }
651 651
 
652 652
 /**
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 			translitteration($ancre)
679 679
 		);
680 680
 	}
681
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
681
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
682 682
 }
683 683
 
684 684
 /**
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
  * @return bool
791 791
  */
792 792
 function test_plugin_actif($plugin) {
793
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
793
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
794 794
 }
795 795
 
796 796
 /**
@@ -858,8 +858,7 @@  discard block
 block discarded – undo
858 858
 		// pour les chaines non traduites, assurer un service minimum
859 859
 		if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) {
860 860
 			$text = str_replace('_', ' ',
861
-				(($n = strpos($text, ':')) === false ? $texte :
862
-					substr($texte, $n + 1)));
861
+				(($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1)));
863 862
 		}
864 863
 		$o['class'] = null;
865 864
 
@@ -931,7 +930,7 @@  discard block
 block discarded – undo
931 930
 		// Si des variables n'ont pas ete inserees, le signaler
932 931
 		// (chaines de langues pas a jour)
933 932
 		if ($args) {
934
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
933
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
935 934
 		}
936 935
 	}
937 936
 
@@ -955,7 +954,7 @@  discard block
 block discarded – undo
955 954
 function joli_repertoire($rep) {
956 955
 	$a = substr($rep, 0, 1);
957 956
 	if ($a <> '.' and $a <> '/') {
958
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
957
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
959 958
 	}
960 959
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
961 960
 
@@ -1009,7 +1008,7 @@  discard block
 block discarded – undo
1009 1008
 			$p -= ($x * 1000);
1010 1009
 		}
1011 1010
 
1012
-		return $s . sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1011
+		return $s.sprintf($s ? "%07.3f ms" : "%.3f ms", $p);
1013 1012
 	}
1014 1013
 }
1015 1014
 
@@ -1078,7 +1077,7 @@  discard block
 block discarded – undo
1078 1077
 	if ($taches and count($taches) and !spip_connect()) {
1079 1078
 		return false;
1080 1079
 	}
1081
-	spip_log("cron !", 'jq' . _LOG_DEBUG);
1080
+	spip_log("cron !", 'jq'._LOG_DEBUG);
1082 1081
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1083 1082
 		return $genie($taches);
1084 1083
 	}
@@ -1182,7 +1181,7 @@  discard block
 block discarded – undo
1182 1181
 
1183 1182
 	if ($queue_next_job_time == -1) {
1184 1183
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1185
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . "job_queue_next.txt");
1184
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP."job_queue_next.txt");
1186 1185
 		}
1187 1186
 		// utiliser un cache memoire si dispo
1188 1187
 		if (function_exists("cache_get") and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1249,8 +1248,8 @@  discard block
 block discarded – undo
1249 1248
 		$src = '';
1250 1249
 	}
1251 1250
 	if ($script) {
1252
-		$script = ("/*<![CDATA[*/\n" .
1253
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1251
+		$script = ("/*<![CDATA[*/\n".
1252
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1254 1253
 			"/*]]>*/");
1255 1254
 	}
1256 1255
 	if ($noscript) {
@@ -1336,13 +1335,13 @@  discard block
 block discarded – undo
1336 1335
 	if ($path_base == null) {
1337 1336
 		// Chemin standard depuis l'espace public
1338 1337
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1339
-			_DIR_RACINE . ':' .
1340
-			_DIR_RACINE . 'squelettes-dist/:' .
1341
-			_DIR_RACINE . 'prive/:' .
1338
+			_DIR_RACINE.':'.
1339
+			_DIR_RACINE.'squelettes-dist/:'.
1340
+			_DIR_RACINE.'prive/:'.
1342 1341
 			_DIR_RESTREINT;
1343 1342
 		// Ajouter squelettes/
1344
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1345
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1343
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1344
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1346 1345
 		}
1347 1346
 		foreach (explode(':', $path) as $dir) {
1348 1347
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1354,7 +1353,7 @@  discard block
 block discarded – undo
1354 1353
 		// Et le(s) dossier(s) des squelettes nommes
1355 1354
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1356 1355
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1357
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1356
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1358 1357
 			}
1359 1358
 		}
1360 1359
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1365,7 +1364,7 @@  discard block
 block discarded – undo
1365 1364
 
1366 1365
 	if (strlen($dir_path)) {
1367 1366
 		$tete = "";
1368
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1367
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1369 1368
 			$tete = array_shift($path_base);
1370 1369
 		}
1371 1370
 		$dirs = array_reverse(explode(':', $dir_path));
@@ -1387,7 +1386,7 @@  discard block
 block discarded – undo
1387 1386
 	// Et le(s) dossier(s) des squelettes nommes
1388 1387
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1389 1388
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1390
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1389
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1391 1390
 		}
1392 1391
 	}
1393 1392
 
@@ -1457,9 +1456,9 @@  discard block
 block discarded – undo
1457 1456
 	// on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png
1458 1457
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1459 1458
 	if (preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1460
-	  and $file_svg_generique = substr($file,0, -strlen($m[0])) . "-xx.svg"
1459
+	  and $file_svg_generique = substr($file, 0, -strlen($m[0]))."-xx.svg"
1461 1460
 		and $f = find_in_theme("$file_svg_generique")) {
1462
-		if ($fsize = substr($f,0,-6) . $m[1] . ".svg" and file_exists($fsize)) {
1461
+		if ($fsize = substr($f, 0, -6).$m[1].".svg" and file_exists($fsize)) {
1463 1462
 			return $themefiles["$subdir$file"] = $fsize;
1464 1463
 		}
1465 1464
 		else {
@@ -1473,7 +1472,7 @@  discard block
 block discarded – undo
1473 1472
 			return $themefiles["$subdir$file"] = $f;
1474 1473
 		}
1475 1474
 	}
1476
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1475
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1477 1476
 
1478 1477
 	return $themefiles["$subdir$file"] = "";
1479 1478
 }
@@ -1501,7 +1500,7 @@  discard block
 block discarded – undo
1501 1500
 function chemin_image($icone) {
1502 1501
 	static $icone_renommer;
1503 1502
 	if ($p = strpos($icone, '?')) {
1504
-		$icone = substr($icone,0, $p);
1503
+		$icone = substr($icone, 0, $p);
1505 1504
 	}
1506 1505
 	// gerer le cas d'un double appel en evitant de refaire le travail inutilement
1507 1506
 	if (strpos($icone, "/") !== false and file_exists($icone)) {
@@ -1581,8 +1580,8 @@  discard block
 block discarded – undo
1581 1580
 			return false;
1582 1581
 		}
1583 1582
 		if ($include and !isset($inc[$dirname][$file])) {
1584
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1585
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1583
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1584
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1586 1585
 		}
1587 1586
 
1588 1587
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1595,14 +1594,14 @@  discard block
 block discarded – undo
1595 1594
 	}
1596 1595
 
1597 1596
 	foreach (creer_chemin() as $dir) {
1598
-		if (!isset($dirs[$a = $dir . $dirname])) {
1599
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1597
+		if (!isset($dirs[$a = $dir.$dirname])) {
1598
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1600 1599
 		}
1601 1600
 		if ($dirs[$a]) {
1602
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1601
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1603 1602
 				if ($include and !isset($inc[$dirname][$file])) {
1604
-					include_once _ROOT_CWD . $a;
1605
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1603
+					include_once _ROOT_CWD.$a;
1604
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1606 1605
 				}
1607 1606
 				if (!defined('_SAUVER_CHEMIN')) {
1608 1607
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1612,7 +1611,7 @@  discard block
 block discarded – undo
1612 1611
 					define('_SAUVER_CHEMIN', true);
1613 1612
 				}
1614 1613
 
1615
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1614
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1616 1615
 			}
1617 1616
 		}
1618 1617
 	}
@@ -1638,7 +1637,7 @@  discard block
 block discarded – undo
1638 1637
 		define('_SAUVER_CHEMIN', true);
1639 1638
 	}
1640 1639
 
1641
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1640
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1642 1641
 }
1643 1642
 
1644 1643
 function clear_path_cache() {
@@ -1707,12 +1706,12 @@  discard block
 block discarded – undo
1707 1706
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1708 1707
 	// on a pas encore inclus flock.php
1709 1708
 	if (!function_exists('preg_files')) {
1710
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1709
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1711 1710
 	}
1712 1711
 
1713 1712
 	// Parcourir le chemin
1714 1713
 	foreach (creer_chemin() as $d) {
1715
-		$f = $d . $dir;
1714
+		$f = $d.$dir;
1716 1715
 		if (@is_dir($f)) {
1717 1716
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? array() : $recurs);
1718 1717
 			foreach ($liste as $chemin) {
@@ -1742,9 +1741,9 @@  discard block
 block discarded – undo
1742 1741
 	static $autsanscookie = array('install', 'base_repair');
1743 1742
 
1744 1743
 	if (in_array($nom, $autsanscookie)) {
1745
-		if (test_espace_prive()){
1744
+		if (test_espace_prive()) {
1746 1745
 			include_spip('base/connect_sql');
1747
-			if (!$strict or !spip_connect()){
1746
+			if (!$strict or !spip_connect()) {
1748 1747
 				return true;
1749 1748
 			}
1750 1749
 		}
@@ -1823,7 +1822,7 @@  discard block
 block discarded – undo
1823 1822
 		return $res;
1824 1823
 	}
1825 1824
 	// Sinon c'est un raccourci ou compat SPIP < 2
1826
-	if (!function_exists($f = 'generer_url_' . $entite)) {
1825
+	if (!function_exists($f = 'generer_url_'.$entite)) {
1827 1826
 		if (!function_exists($f .= '_dist')) {
1828 1827
 			$f = '';
1829 1828
 		}
@@ -1832,8 +1831,8 @@  discard block
 block discarded – undo
1832 1831
 		$url = $f($id, $args, $ancre);
1833 1832
 		if (strlen($args)) {
1834 1833
 			$url .= strstr($url, '?')
1835
-				? '&amp;' . $args
1836
-				: '?' . $args;
1834
+				? '&amp;'.$args
1835
+				: '?'.$args;
1837 1836
 		}
1838 1837
 
1839 1838
 		return $url;
@@ -1864,8 +1863,8 @@  discard block
 block discarded – undo
1864 1863
 	include_spip('base/connect_sql');
1865 1864
 	$id_type = id_table_objet($entite, $public);
1866 1865
 
1867
-	return _DIR_RACINE . get_spip_script('./')
1868
-	. "?" . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1866
+	return _DIR_RACINE.get_spip_script('./')
1867
+	. "?"._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1869 1868
 	. (!$args ? '' : "&$args")
1870 1869
 	. (!$ancre ? '' : "#$ancre");
1871 1870
 }
@@ -2017,7 +2016,7 @@  discard block
 block discarded – undo
2017 2016
 			if (!empty($_SERVER['QUERY_STRING'])
2018 2017
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2019 2018
 			) {
2020
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2019
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2021 2020
 			}
2022 2021
 		}
2023 2022
 	}
@@ -2044,17 +2043,17 @@  discard block
 block discarded – undo
2044 2043
 	list($myself) = explode('?', $myself);
2045 2044
 	// vieux mode HTTP qui envoie après le nom de la methode l'URL compléte
2046 2045
 	// protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"]
2047
-	if (strpos($myself,'://') !== false) {
2048
-		$myself = explode('://',$myself);
2046
+	if (strpos($myself, '://') !== false) {
2047
+		$myself = explode('://', $myself);
2049 2048
 		array_shift($myself);
2050
-		$myself = implode('://',$myself);
2051
-		$myself = explode('/',$myself);
2049
+		$myself = implode('://', $myself);
2050
+		$myself = explode('/', $myself);
2052 2051
 		array_shift($myself);
2053
-		$myself = implode('/',$myself);
2052
+		$myself = implode('/', $myself);
2054 2053
 	}
2055
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2054
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2056 2055
 
2057
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2056
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2058 2057
 
2059 2058
 	return $url;
2060 2059
 }
@@ -2092,17 +2091,17 @@  discard block
 block discarded – undo
2092 2091
  **/
2093 2092
 function generer_url_ecrire($script = '', $args = "", $no_entities = false, $rel = false) {
2094 2093
 	if (!$rel) {
2095
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2094
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2096 2095
 	} else {
2097 2096
 		if (!is_string($rel)) {
2098 2097
 			$rel = _DIR_RESTREINT ? _DIR_RESTREINT :
2099
-				('./' . _SPIP_ECRIRE_SCRIPT);
2098
+				('./'._SPIP_ECRIRE_SCRIPT);
2100 2099
 		}
2101 2100
 	}
2102 2101
 
2103 2102
 	list($script, $ancre) = array_pad(explode('#', $script), 2, null);
2104 2103
 	if ($script and ($script <> 'accueil' or $rel)) {
2105
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2104
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2106 2105
 	} elseif ($args) {
2107 2106
 		$args = "?$args";
2108 2107
 	}
@@ -2110,7 +2109,7 @@  discard block
 block discarded – undo
2110 2109
 		$args .= "#$ancre";
2111 2110
 	}
2112 2111
 
2113
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2112
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2114 2113
 }
2115 2114
 
2116 2115
 //
@@ -2180,25 +2179,25 @@  discard block
 block discarded – undo
2180 2179
 		if (is_array($args)) {
2181 2180
 			$r = '';
2182 2181
 			foreach ($args as $k => $v) {
2183
-				$r .= '&' . $k . '=' . $v;
2182
+				$r .= '&'.$k.'='.$v;
2184 2183
 			}
2185 2184
 			$args = substr($r, 1);
2186 2185
 		}
2187 2186
 		$action .=
2188
-			(strpos($action, '?') !== false ? '&' : '?') . $args;
2187
+			(strpos($action, '?') !== false ? '&' : '?').$args;
2189 2188
 	}
2190 2189
 	if (!$no_entities) {
2191 2190
 		$action = quote_amp($action);
2192 2191
 	}
2193 2192
 
2194 2193
 	// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2195
-	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(",^/[.]/,", "/", "/$action"));
2194
+	return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(",^/[.]/,", "/", "/$action"));
2196 2195
 }
2197 2196
 
2198 2197
 // https://code.spip.net/@generer_url_prive
2199 2198
 function generer_url_prive($script, $args = "", $no_entities = false) {
2200 2199
 
2201
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2200
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2202 2201
 }
2203 2202
 
2204 2203
 // Pour les formulaires en methode POST,
@@ -2233,8 +2232,7 @@  discard block
 block discarded – undo
2233 2232
 	. "><div>\n"
2234 2233
 	. "<input type='hidden' name='exec' value='$script1' />"
2235 2234
 	. $corps
2236
-	. (!$submit ? '' :
2237
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo' type='submit' value=\"" . entites_html($submit) . "\" /></div>"))
2235
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo' type='submit' value=\"".entites_html($submit)."\" /></div>"))
2238 2236
 	. "</div></form>\n";
2239 2237
 }
2240 2238
 
@@ -2259,14 +2257,14 @@  discard block
 block discarded – undo
2259 2257
 		? generer_url_ecrire(_request('exec'))
2260 2258
 		: generer_url_public();
2261 2259
 
2262
-	return "\n<form action='" .
2263
-	$h .
2264
-	"'" .
2265
-	$atts .
2266
-	">\n" .
2267
-	"<div>" .
2268
-	"\n<input type='hidden' name='action' value='$script' />" .
2269
-	$corps .
2260
+	return "\n<form action='".
2261
+	$h.
2262
+	"'".
2263
+	$atts.
2264
+	">\n".
2265
+	"<div>".
2266
+	"\n<input type='hidden' name='action' value='$script' />".
2267
+	$corps.
2270 2268
 	"</div></form>";
2271 2269
 }
2272 2270
 
@@ -2294,7 +2292,7 @@  discard block
 block discarded – undo
2294 2292
 		: generer_url_public('', '', false, false);
2295 2293
 	$url = parametre_url($url, 'action', $script);
2296 2294
 	if ($args) {
2297
-		$url .= quote_amp('&' . $args);
2295
+		$url .= quote_amp('&'.$args);
2298 2296
 	}
2299 2297
 
2300 2298
 	if ($no_entities) {
@@ -2344,17 +2342,17 @@  discard block
 block discarded – undo
2344 2342
 
2345 2343
 	// le nom du repertoire plugins/ activables/desactivables
2346 2344
 	if (!defined('_DIR_PLUGINS')) {
2347
-		define('_DIR_PLUGINS', _DIR_RACINE . "plugins/");
2345
+		define('_DIR_PLUGINS', _DIR_RACINE."plugins/");
2348 2346
 	}
2349 2347
 
2350 2348
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2351 2349
 	if (!defined('_DIR_PLUGINS_DIST')) {
2352
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . "plugins-dist/");
2350
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE."plugins-dist/");
2353 2351
 	}
2354 2352
 
2355 2353
 	// le nom du repertoire des librairies
2356 2354
 	if (!defined('_DIR_LIB')) {
2357
-		define('_DIR_LIB', _DIR_RACINE . "lib/");
2355
+		define('_DIR_LIB', _DIR_RACINE."lib/");
2358 2356
 	}
2359 2357
 
2360 2358
 	if (!defined('_DIR_IMG')) {
@@ -2364,29 +2362,29 @@  discard block
 block discarded – undo
2364 2362
 		define('_DIR_LOGOS', $pa);
2365 2363
 	}
2366 2364
 	if (!defined('_DIR_IMG_ICONES')) {
2367
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . "icones/");
2365
+		define('_DIR_IMG_ICONES', _DIR_LOGOS."icones/");
2368 2366
 	}
2369 2367
 
2370 2368
 	if (!defined('_DIR_DUMP')) {
2371
-		define('_DIR_DUMP', $ti . "dump/");
2369
+		define('_DIR_DUMP', $ti."dump/");
2372 2370
 	}
2373 2371
 	if (!defined('_DIR_SESSIONS')) {
2374
-		define('_DIR_SESSIONS', $ti . "sessions/");
2372
+		define('_DIR_SESSIONS', $ti."sessions/");
2375 2373
 	}
2376 2374
 	if (!defined('_DIR_TRANSFERT')) {
2377
-		define('_DIR_TRANSFERT', $ti . "upload/");
2375
+		define('_DIR_TRANSFERT', $ti."upload/");
2378 2376
 	}
2379 2377
 	if (!defined('_DIR_CACHE')) {
2380
-		define('_DIR_CACHE', $ti . "cache/");
2378
+		define('_DIR_CACHE', $ti."cache/");
2381 2379
 	}
2382 2380
 	if (!defined('_DIR_CACHE_XML')) {
2383
-		define('_DIR_CACHE_XML', _DIR_CACHE . "xml/");
2381
+		define('_DIR_CACHE_XML', _DIR_CACHE."xml/");
2384 2382
 	}
2385 2383
 	if (!defined('_DIR_SKELS')) {
2386
-		define('_DIR_SKELS', _DIR_CACHE . "skel/");
2384
+		define('_DIR_SKELS', _DIR_CACHE."skel/");
2387 2385
 	}
2388 2386
 	if (!defined('_DIR_AIDE')) {
2389
-		define('_DIR_AIDE', _DIR_CACHE . "aide/");
2387
+		define('_DIR_AIDE', _DIR_CACHE."aide/");
2390 2388
 	}
2391 2389
 	if (!defined('_DIR_TMP')) {
2392 2390
 		define('_DIR_TMP', $ti);
@@ -2416,27 +2414,27 @@  discard block
 block discarded – undo
2416 2414
 	// Declaration des fichiers
2417 2415
 
2418 2416
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2419
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . "charger_plugins_chemins.php");
2417
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE."charger_plugins_chemins.php");
2420 2418
 	}
2421 2419
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2422
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php");
2420
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE."charger_plugins_options.php");
2423 2421
 	}
2424 2422
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2425
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php");
2423
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE."charger_plugins_fonctions.php");
2426 2424
 	}
2427 2425
 	if (!defined('_CACHE_PIPELINES')) {
2428
-		define('_CACHE_PIPELINES', _DIR_CACHE . "charger_pipelines.php");
2426
+		define('_CACHE_PIPELINES', _DIR_CACHE."charger_pipelines.php");
2429 2427
 	}
2430 2428
 	if (!defined('_CACHE_CHEMIN')) {
2431
-		define('_CACHE_CHEMIN', _DIR_CACHE . "chemin.txt");
2429
+		define('_CACHE_CHEMIN', _DIR_CACHE."chemin.txt");
2432 2430
 	}
2433 2431
 
2434 2432
 	# attention .php obligatoire pour ecrire_fichier_securise
2435 2433
 	if (!defined('_FILE_META')) {
2436
-		define('_FILE_META', $ti . 'meta_cache.php');
2434
+		define('_FILE_META', $ti.'meta_cache.php');
2437 2435
 	}
2438 2436
 	if (!defined('_DIR_LOG')) {
2439
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2437
+		define('_DIR_LOG', _DIR_TMP.'log/');
2440 2438
 	}
2441 2439
 	if (!defined('_FILE_LOG')) {
2442 2440
 		define('_FILE_LOG', 'spip');
@@ -2452,8 +2450,8 @@  discard block
 block discarded – undo
2452 2450
 	}
2453 2451
 	if (!defined('_FILE_CONNECT')) {
2454 2452
 		define('_FILE_CONNECT',
2455
-		(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2456
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2453
+		(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2454
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2457 2455
 				: false)));
2458 2456
 	}
2459 2457
 
@@ -2463,7 +2461,7 @@  discard block
 block discarded – undo
2463 2461
 	}
2464 2462
 	if (!defined('_FILE_CHMOD')) {
2465 2463
 		define('_FILE_CHMOD',
2466
-		(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2464
+		(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2467 2465
 			: false));
2468 2466
 	}
2469 2467
 
@@ -2475,10 +2473,10 @@  discard block
 block discarded – undo
2475 2473
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2476 2474
 	}
2477 2475
 	if (!defined('_FILE_CONNECT_TMP')) {
2478
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2476
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2479 2477
 	}
2480 2478
 	if (!defined('_FILE_CHMOD_TMP')) {
2481
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2479
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2482 2480
 	}
2483 2481
 
2484 2482
 	// Definition des droits d'acces en ecriture
@@ -2496,13 +2494,13 @@  discard block
 block discarded – undo
2496 2494
 		define('_DEFAULT_CHARSET', 'utf-8');
2497 2495
 	}
2498 2496
 	if (!defined('_ROOT_PLUGINS')) {
2499
-		define('_ROOT_PLUGINS', _ROOT_RACINE . "plugins/");
2497
+		define('_ROOT_PLUGINS', _ROOT_RACINE."plugins/");
2500 2498
 	}
2501 2499
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2502
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . "plugins-dist/");
2500
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE."plugins-dist/");
2503 2501
 	}
2504 2502
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2505
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2503
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2506 2504
 	}
2507 2505
 
2508 2506
 	// La taille des Log
@@ -2539,7 +2537,7 @@  discard block
 block discarded – undo
2539 2537
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2540 2538
 	// pour le rendre surchargeable, on va provoquer un reecriture
2541 2539
 	// systematique du noyau ou une baisse de perfs => a etudier)
2542
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2540
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2543 2541
 
2544 2542
 	// charger tout de suite le path et son cache
2545 2543
 	load_path_cache();
@@ -2586,7 +2584,7 @@  discard block
 block discarded – undo
2586 2584
 		if (!empty($_SERVER['QUERY_STRING'])
2587 2585
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2588 2586
 		) {
2589
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2587
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2590 2588
 		}
2591 2589
 	}
2592 2590
 
@@ -2622,7 +2620,7 @@  discard block
 block discarded – undo
2622 2620
 
2623 2621
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2624 2622
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2625
-				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/';
2623
+				$uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/';
2626 2624
 			} else {
2627 2625
 				$uri_ref = "";
2628 2626
 			}
@@ -2710,7 +2708,7 @@  discard block
 block discarded – undo
2710 2708
 	}
2711 2709
 	if (!defined('_CACHE_RUBRIQUES')) {
2712 2710
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2713
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2711
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2714 2712
 	}
2715 2713
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2716 2714
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -2809,7 +2807,7 @@  discard block
 block discarded – undo
2809 2807
 					$memory *= 1024;
2810 2808
 			}
2811 2809
 			if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) {
2812
-				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M');
2810
+				@ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M');
2813 2811
 				if (trim(ini_get('memory_limit')) != $m) {
2814 2812
 					if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) {
2815 2813
 						define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
@@ -2959,7 +2957,7 @@  discard block
 block discarded – undo
2959 2957
 					}
2960 2958
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
2961 2959
 						spip_log($GLOBALS['visiteur_session']['nom']
2962
-							. " " . _VAR_MODE);
2960
+							. " "._VAR_MODE);
2963 2961
 					}
2964 2962
 				} // pas autorise ?
2965 2963
 				else {
@@ -2967,7 +2965,7 @@  discard block
 block discarded – undo
2967 2965
 					if (!$GLOBALS['visiteur_session']) {
2968 2966
 						include_spip('inc/headers');
2969 2967
 						$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
2970
-						redirige_par_entete(generer_url_public('login','url=' . rawurlencode($redirect), true));
2968
+						redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true));
2971 2969
 					}
2972 2970
 					// sinon tant pis
2973 2971
 				}
@@ -3010,10 +3008,10 @@  discard block
 block discarded – undo
3010 3008
 	// mais on risque de perturber des plugins en initialisant trop tot
3011 3009
 	// certaines constantes
3012 3010
 	@spip_initialisation_core(
3013
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3014
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3015
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3016
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3011
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3012
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3013
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3014
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3017 3015
 	);
3018 3016
 
3019 3017
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3046,7 +3044,7 @@  discard block
 block discarded – undo
3046 3044
 	}
3047 3045
 
3048 3046
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3049
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3047
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3050 3048
 
3051 3049
 		$session = charger_fonction('session', 'inc');
3052 3050
 		if ($session()) {
@@ -3126,7 +3124,7 @@  discard block
 block discarded – undo
3126 3124
 		$s = pipeline('definir_session',
3127 3125
 			$GLOBALS['visiteur_session']
3128 3126
 				? serialize($GLOBALS['visiteur_session'])
3129
-				. '_' . @$_COOKIE['spip_session']
3127
+				. '_'.@$_COOKIE['spip_session']
3130 3128
 				: ''
3131 3129
 		);
3132 3130
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3282,12 +3280,12 @@  discard block
 block discarded – undo
3282 3280
 	$GLOBALS['_INC_PUBLIC']++;
3283 3281
 
3284 3282
 	// fix #4235
3285
-	$cache_utilise_session_appelant	= (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3283
+	$cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null);
3286 3284
 
3287 3285
 
3288 3286
 	foreach (is_array($fond) ? $fond : array($fond) as $f) {
3289 3287
 		
3290
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3288
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3291 3289
 
3292 3290
 		$page = evaluer_fond($f, $contexte, $connect);
3293 3291
 		if ($page === '') {
@@ -3326,7 +3324,7 @@  discard block
 block discarded – undo
3326 3324
 		}
3327 3325
 		
3328 3326
 		// contamination de la session appelante, pour les inclusions statiques
3329
-		if (isset($page['invalideurs']['session'])){
3327
+		if (isset($page['invalideurs']['session'])) {
3330 3328
 			$cache_utilise_session_appelant = $page['invalideurs']['session'];
3331 3329
 		}
3332 3330
 	}
@@ -3372,7 +3370,7 @@  discard block
 block discarded – undo
3372 3370
  * @return array|string
3373 3371
  */
3374 3372
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3375
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3373
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3376 3374
 	if (!$pathinfo) {
3377 3375
 		return $f;
3378 3376
 	}
Please login to merge, or discard this patch.