Completed
Push — master ( 2d11dc...df46b5 )
by cam
01:03
created
ecrire/inc/log.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	// si spip_log() est appelé dans mes_options, toutes les constantes n'ont pas été définies
41 41
 	$logfile =
42
-		($logdir ?? (defined('_DIR_LOG') ? _DIR_LOG : _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES))
42
+		($logdir ?? (defined('_DIR_LOG') ? _DIR_LOG : _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES))
43 43
 		. $logname
44 44
 		. ($logsuf ?? (defined('_FILE_LOG_SUFFIX') ? _FILE_LOG_SUFFIX : '.log'));
45 45
 
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 
56 56
 	// Si le repertoire défini n'existe pas, poser dans tmp/
57 57
 	if (!$test_repertoire[$d]) {
58
-		$logfile = _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES . $logname . '.log';
58
+		$logfile = _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES.$logname.'.log';
59 59
 	}
60 60
 
61 61
 	$rotate = 0;
62
-	$pid = '(pid ' . @getmypid() . ')';
62
+	$pid = '(pid '.@getmypid().')';
63 63
 
64 64
 	// accepter spip_log( Array )
65 65
 	if (!is_string($message)) {
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 			$fi = substr($fi, strlen(_ROOT_RACINE));
75 75
 		}
76 76
 		$fu = $debug[2]['function'] ?? '';
77
-		$debugverb = "$fi:L$l:$fu" . '():';
77
+		$debugverb = "$fi:L$l:$fu".'():';
78 78
 	}
79 79
 
80
-	$m = date('Y-m-d H:i:s') . ' ' . ($GLOBALS['ip'] ?? '') . ' ' . $pid . ' '
80
+	$m = date('Y-m-d H:i:s').' '.($GLOBALS['ip'] ?? '').' '.$pid.' '
81 81
 		//distinguer les logs prives et publics dans les grep
82 82
 		. $debugverb
83 83
 		. (test_espace_prive() ? ':Pri:' : ':Pub:')
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 		$rotate-- > 0
103 103
 		and function_exists('spip_unlink')
104 104
 	) {
105
-		spip_unlink($logfile . '.' . $rotate);
105
+		spip_unlink($logfile.'.'.$rotate);
106 106
 		while ($rotate--) {
107
-			@rename($logfile . ($rotate ? '.' . $rotate : ''), $logfile . '.' . ($rotate + 1));
107
+			@rename($logfile.($rotate ? '.'.$rotate : ''), $logfile.'.'.($rotate + 1));
108 108
 		}
109 109
 	}
110 110
 
Please login to merge, or discard this patch.
ecrire/inc/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -303,9 +303,9 @@
 block discarded – undo
303 303
 			// et dans ce cas il faut verifier que l'ecriture en base a bien eu lieu a l'identique si il y a des planes dans la chaine
304 304
 			// car sinon ca casse le serialize PHP - par exemple si on est en mysql utf8 (non mb4)
305 305
 			if ($has_planes) {
306
-				$check_store = sql_getfetsel('valeur', 'spip_' . $table, 'nom=' . sql_quote($casier));
306
+				$check_store = sql_getfetsel('valeur', 'spip_'.$table, 'nom='.sql_quote($casier));
307 307
 				if ($check_store !== $serialized_store) {
308
-					array_walk_recursive($store, function (&$value, $key) {
308
+					array_walk_recursive($store, function(&$value, $key) {
309 309
 						if (is_string($value)) {
310 310
 							$value = utf8_noplanes($value);
311 311
 						}
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +124 added lines, -125 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
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	// passer en minuscules (cf les balises de formulaires)
80 80
 	// et inclure le fichier
81 81
 	if (
82
-		!$inc = include_spip($dossier . ($d = strtolower($nom)))
82
+		!$inc = include_spip($dossier.($d = strtolower($nom)))
83 83
 		// si le fichier truc/machin/nom.php n'existe pas,
84 84
 		// la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions
85 85
 		and strlen(dirname($dossier)) and dirname($dossier) != '.'
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	// Echec : message d'erreur
101
-	spip_log("fonction $nom ($f ou $g) indisponible" .
101
+	spip_log("fonction $nom ($f ou $g) indisponible".
102 102
 		($inc ? '' : " (fichier $d absent de $dossier)"));
103 103
 
104 104
 	include_spip('inc/minipres');
105 105
 	echo minipres(
106 106
 		_T('forum_titre_erreur'),
107 107
 		$inc ?
108
-			_T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($f) . '</code>'])
108
+			_T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($f).'</code>'])
109 109
 			. '<br />'
110
-			. _T('fonction_introuvable', ['fonction' => '<code>' . spip_htmlentities($g) . '</code>'])
110
+			. _T('fonction_introuvable', ['fonction' => '<code>'.spip_htmlentities($g).'</code>'])
111 111
 			:
112
-			_T('fichier_introuvable', ['fichier' => '<code>' . spip_htmlentities($d) . '</code>']),
113
-		['all_inline' => true,'status' => 404]
112
+			_T('fichier_introuvable', ['fichier' => '<code>'.spip_htmlentities($d).'</code>']),
113
+		['all_inline' => true, 'status' => 404]
114 114
 	);
115 115
 	exit;
116 116
 }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
  *     - string : chemin du fichier trouvé
157 157
  **/
158 158
 function include_spip($f, $include = true) {
159
-	return find_in_path($f . '.php', '', $include);
159
+	return find_in_path($f.'.php', '', $include);
160 160
 }
161 161
 
162 162
 /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
  *     - string : chemin du fichier trouvé
177 177
  **/
178 178
 function require_spip($f) {
179
-	return find_in_path($f . '.php', '', 'required');
179
+	return find_in_path($f.'.php', '', 'required');
180 180
 }
181 181
 
182 182
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		// donc il faut l'inclure "en globals"
194 194
 		if ($f = find_in_path('mes_fonctions.php')) {
195 195
 			global $dossier_squelettes;
196
-			include_once(_ROOT_CWD . $f);
196
+			include_once(_ROOT_CWD.$f);
197 197
 		}
198 198
 
199 199
 		if (@is_readable(_CACHE_PLUGINS_FCT)) {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	}
299 299
 
300 300
 	// appliquer notre fonction si elle existe
301
-	$fonc = 'execute_pipeline_' . strtolower($action);
301
+	$fonc = 'execute_pipeline_'.strtolower($action);
302 302
 	if (function_exists($fonc)) {
303 303
 		$val = $fonc($val);
304 304
 	} // plantage ?
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 function spip_log($message = null, $name = null) {
364 364
 	static $pre = [];
365 365
 	static $log;
366
-	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs);
366
+	preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs);
367 367
 	if (!isset($regs[1]) or !$logname = $regs[1]) {
368 368
 		$logname = null;
369 369
 	}
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 		if (!is_string($message)) {
392 392
 			$message = print_r($message, true);
393 393
 		}
394
-		$log($pre[$niveau] . ' ' . $message, $logname);
394
+		$log($pre[$niveau].' '.$message, $logname);
395 395
 	}
396 396
 }
397 397
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	foreach ($regexp as $r => $e) {
598 598
 		$regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e));
599 599
 	}
600
-	$regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,';
600
+	$regexp = ',^('.implode('|', $regexp).'[[]?[]]?)(=.*)?$,';
601 601
 	$ajouts = array_flip(explode('|', $c));
602 602
 	$u = is_array($v) ? $v : rawurlencode((string) $v);
603 603
 	$testv = (is_array($v) ? count($v) : strlen((string) $v));
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 			// Ajout. Pour une variable, remplacer au meme endroit,
625 625
 			// pour un tableau ce sera fait dans la prochaine boucle
626 626
 			elseif (substr($r[1], -2) != '[]') {
627
-				$url[$n] = $r[1] . '=' . $u;
627
+				$url[$n] = $r[1].'='.$u;
628 628
 				unset($ajouts[$r[1]]);
629 629
 			}
630 630
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -645,11 +645,11 @@  discard block
 block discarded – undo
645 645
 	} elseif ($testv) {
646 646
 		foreach ($ajouts as $k => $n) {
647 647
 			if (!is_array($v)) {
648
-				$url[] = $k . '=' . $u;
648
+				$url[] = $k.'='.$u;
649 649
 			} else {
650
-				$id = (substr($k, -2) == '[]') ? $k : ($k . '[]');
650
+				$id = (substr($k, -2) == '[]') ? $k : ($k.'[]');
651 651
 				foreach ($v as $w) {
652
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w));
652
+					$url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w));
653 653
 				}
654 654
 			}
655 655
 		}
@@ -660,10 +660,10 @@  discard block
 block discarded – undo
660 660
 
661 661
 	// recomposer l'adresse
662 662
 	if ($url) {
663
-		$a .= '?' . join($sep, $url);
663
+		$a .= '?'.join($sep, $url);
664 664
 	}
665 665
 
666
-	return $a . $ancre;
666
+	return $a.$ancre;
667 667
 }
668 668
 
669 669
 /**
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 			translitteration($ancre)
696 696
 		);
697 697
 	}
698
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
698
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
699 699
 }
700 700
 
701 701
 /**
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
  * @return bool
812 812
  */
813 813
 function test_plugin_actif($plugin) {
814
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
814
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
815 815
 }
816 816
 
817 817
 /**
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 					$value = interdire_scripts($value, -1);
944 944
 				}
945 945
 				if (!empty($options['class'])) {
946
-					$value = "<span class='" . $options['class'] . "'>$value</span>";
946
+					$value = "<span class='".$options['class']."'>$value</span>";
947 947
 				}
948 948
 				$text = str_replace("@$name@", $value, $text);
949 949
 				unset($args[$name]);
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 		// Si des variables n'ont pas ete inserees, le signaler
953 953
 		// (chaines de langues pas a jour)
954 954
 		if ($args) {
955
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
955
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
956 956
 		}
957 957
 	}
958 958
 
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 function joli_repertoire($rep) {
977 977
 	$a = substr($rep, 0, 1);
978 978
 	if ($a <> '.' and $a <> '/') {
979
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
979
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
980 980
 	}
981 981
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
982 982
 
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
 			$p -= ($x * 1000);
1031 1031
 		}
1032 1032
 
1033
-		return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1033
+		return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1034 1034
 	}
1035 1035
 }
1036 1036
 
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 	if ($taches and count($taches) and !spip_connect()) {
1098 1098
 		return false;
1099 1099
 	}
1100
-	spip_log('cron !', 'jq' . _LOG_DEBUG);
1100
+	spip_log('cron !', 'jq'._LOG_DEBUG);
1101 1101
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1102 1102
 		return $genie($taches);
1103 1103
 	}
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 
1202 1202
 	if ($queue_next_job_time == -1) {
1203 1203
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1204
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
1204
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt');
1205 1205
 		}
1206 1206
 		// utiliser un cache memoire si dispo
1207 1207
 		if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1270,8 +1270,8 @@  discard block
 block discarded – undo
1270 1270
 		$src = '';
1271 1271
 	}
1272 1272
 	if ($script) {
1273
-		$script = ("/*<![CDATA[*/\n" .
1274
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1273
+		$script = ("/*<![CDATA[*/\n".
1274
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1275 1275
 			'/*]]>*/');
1276 1276
 	}
1277 1277
 	if ($noscript) {
@@ -1357,13 +1357,13 @@  discard block
 block discarded – undo
1357 1357
 	if ($path_base == null) {
1358 1358
 		// Chemin standard depuis l'espace public
1359 1359
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1360
-			_DIR_RACINE . ':' .
1361
-			_DIR_RACINE . 'squelettes-dist/:' .
1362
-			_DIR_RACINE . 'prive/:' .
1360
+			_DIR_RACINE.':'.
1361
+			_DIR_RACINE.'squelettes-dist/:'.
1362
+			_DIR_RACINE.'prive/:'.
1363 1363
 			_DIR_RESTREINT;
1364 1364
 		// Ajouter squelettes/
1365
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1366
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1365
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1366
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1367 1367
 		}
1368 1368
 		foreach (explode(':', $path) as $dir) {
1369 1369
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
 		// Et le(s) dossier(s) des squelettes nommes
1376 1376
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1377 1377
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1378
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1378
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1379 1379
 			}
1380 1380
 		}
1381 1381
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1386,7 +1386,7 @@  discard block
 block discarded – undo
1386 1386
 
1387 1387
 	if (is_array($dir_path) or strlen($dir_path)) {
1388 1388
 		$tete = '';
1389
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1389
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1390 1390
 			$tete = array_shift($path_base);
1391 1391
 		}
1392 1392
 		$dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
@@ -1407,7 +1407,7 @@  discard block
 block discarded – undo
1407 1407
 	// Et le(s) dossier(s) des squelettes nommes
1408 1408
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1409 1409
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1410
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1410
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1411 1411
 		}
1412 1412
 	}
1413 1413
 
@@ -1478,14 +1478,14 @@  discard block
 block discarded – undo
1478 1478
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1479 1479
 	if (
1480 1480
 		preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1481
-		and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg'
1481
+		and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg'
1482 1482
 		and $f = find_in_theme("$file_svg_generique")
1483 1483
 	) {
1484
-		if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1484
+		if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) {
1485 1485
 			return $themefiles["$subdir$file"] = $fsize;
1486 1486
 		}
1487 1487
 		else {
1488
-			return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1488
+			return $themefiles["$subdir$file"] = "$f?".$m[1].'px';
1489 1489
 		}
1490 1490
 	}
1491 1491
 
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
 			return $themefiles["$subdir$file"] = $f;
1496 1496
 		}
1497 1497
 	}
1498
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1498
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1499 1499
 
1500 1500
 	return $themefiles["$subdir$file"] = '';
1501 1501
 }
@@ -1603,8 +1603,8 @@  discard block
 block discarded – undo
1603 1603
 			return false;
1604 1604
 		}
1605 1605
 		if ($include and !isset($inc[$dirname][$file])) {
1606
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1607
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1606
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1607
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1608 1608
 		}
1609 1609
 
1610 1610
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1617,14 +1617,14 @@  discard block
 block discarded – undo
1617 1617
 	}
1618 1618
 
1619 1619
 	foreach (creer_chemin() as $dir) {
1620
-		if (!isset($dirs[$a = $dir . $dirname])) {
1621
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1620
+		if (!isset($dirs[$a = $dir.$dirname])) {
1621
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1622 1622
 		}
1623 1623
 		if ($dirs[$a]) {
1624
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1624
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1625 1625
 				if ($include and !isset($inc[$dirname][$file])) {
1626
-					include_once _ROOT_CWD . $a;
1627
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1626
+					include_once _ROOT_CWD.$a;
1627
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1628 1628
 				}
1629 1629
 				if (!defined('_SAUVER_CHEMIN')) {
1630 1630
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
 					define('_SAUVER_CHEMIN', true);
1635 1635
 				}
1636 1636
 
1637
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1637
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1638 1638
 			}
1639 1639
 		}
1640 1640
 	}
@@ -1660,7 +1660,7 @@  discard block
 block discarded – undo
1660 1660
 		define('_SAUVER_CHEMIN', true);
1661 1661
 	}
1662 1662
 
1663
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1663
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1664 1664
 }
1665 1665
 
1666 1666
 function clear_path_cache() {
@@ -1730,12 +1730,12 @@  discard block
 block discarded – undo
1730 1730
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1731 1731
 	// on a pas encore inclus flock.php
1732 1732
 	if (!function_exists('preg_files')) {
1733
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1733
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1734 1734
 	}
1735 1735
 
1736 1736
 	// Parcourir le chemin
1737 1737
 	foreach (creer_chemin() as $d) {
1738
-		$f = $d . $dir;
1738
+		$f = $d.$dir;
1739 1739
 		if (@is_dir($f)) {
1740 1740
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs);
1741 1741
 			foreach ($liste as $chemin) {
@@ -1785,9 +1785,9 @@  discard block
 block discarded – undo
1785 1785
 	if ($type === 'defaut') {
1786 1786
 		$objet = objet_type($quoi);
1787 1787
 		if (
1788
-			$f = charger_fonction('generer_' . $objet . '_url', 'urls', true)
1788
+			$f = charger_fonction('generer_'.$objet.'_url', 'urls', true)
1789 1789
 			// deprecated
1790
-			or $f = charger_fonction('generer_url_' . $objet, 'urls', true)
1790
+			or $f = charger_fonction('generer_url_'.$objet, 'urls', true)
1791 1791
 		) {
1792 1792
 			return $f;
1793 1793
 		}
@@ -1800,7 +1800,7 @@  discard block
 block discarded – undo
1800 1800
 	}
1801 1801
 
1802 1802
 	// inclure le module d'url
1803
-	include_spip('urls/' . $url_type);
1803
+	include_spip('urls/'.$url_type);
1804 1804
 
1805 1805
 	switch ($quoi) {
1806 1806
 		case 'page':
@@ -1954,8 +1954,8 @@  discard block
 block discarded – undo
1954 1954
 	include_spip('base/connect_sql');
1955 1955
 	$id_type = id_table_objet($entite, $public);
1956 1956
 
1957
-	return _DIR_RACINE . get_spip_script('./')
1958
-	. '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1957
+	return _DIR_RACINE.get_spip_script('./')
1958
+	. '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1959 1959
 	. (!$args ? '' : "&$args")
1960 1960
 	. (!$ancre ? '' : "#$ancre");
1961 1961
 }
@@ -2130,7 +2130,7 @@  discard block
 block discarded – undo
2130 2130
 				!empty($_SERVER['QUERY_STRING'])
2131 2131
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2132 2132
 			) {
2133
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2133
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2134 2134
 			}
2135 2135
 		}
2136 2136
 	}
@@ -2168,9 +2168,9 @@  discard block
 block discarded – undo
2168 2168
 		array_shift($myself);
2169 2169
 		$myself = implode('/', $myself);
2170 2170
 	}
2171
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2171
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2172 2172
 
2173
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2173
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2174 2174
 
2175 2175
 	return $url;
2176 2176
 }
@@ -2209,16 +2209,16 @@  discard block
 block discarded – undo
2209 2209
 function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) {
2210 2210
 	$script ??= '';
2211 2211
 	if (!$rel) {
2212
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2212
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2213 2213
 	} else {
2214 2214
 		if (!is_string($rel)) {
2215
-			$rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT;
2215
+			$rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT;
2216 2216
 		}
2217 2217
 	}
2218 2218
 
2219 2219
 	[$script, $ancre] = array_pad(explode('#', $script), 2, null);
2220 2220
 	if ($script and ($script <> 'accueil' or $rel)) {
2221
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2221
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2222 2222
 	} elseif ($args) {
2223 2223
 		$args = "?$args";
2224 2224
 	}
@@ -2226,7 +2226,7 @@  discard block
 block discarded – undo
2226 2226
 		$args .= "#$ancre";
2227 2227
 	}
2228 2228
 
2229
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2229
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2230 2230
 }
2231 2231
 
2232 2232
 //
@@ -2308,10 +2308,10 @@  discard block
 block discarded – undo
2308 2308
 			$action = parametre_url($action, _SPIP_PAGE, $script, '&');
2309 2309
 		}
2310 2310
 		if ($args) {
2311
-			$action .= (strpos($action, '?') !== false ? '&' : '?') . $args;
2311
+			$action .= (strpos($action, '?') !== false ? '&' : '?').$args;
2312 2312
 		}
2313 2313
 		// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2314
-		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action"));
2314
+		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action"));
2315 2315
 	}
2316 2316
 
2317 2317
 	if (!$no_entities) {
@@ -2323,7 +2323,7 @@  discard block
 block discarded – undo
2323 2323
 
2324 2324
 function generer_url_prive($script, $args = '', $no_entities = false) {
2325 2325
 
2326
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2326
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2327 2327
 }
2328 2328
 
2329 2329
 // Pour les formulaires en methode POST,
@@ -2358,8 +2358,7 @@  discard block
 block discarded – undo
2358 2358
 	. "><div>\n"
2359 2359
 	. "<input type='hidden' name='exec' value='$script1' />"
2360 2360
 	. $corps
2361
-	. (!$submit ? '' :
2362
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
2361
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>'))
2363 2362
 	. "</div></form>\n";
2364 2363
 }
2365 2364
 
@@ -2384,14 +2383,14 @@  discard block
 block discarded – undo
2384 2383
 		? generer_url_ecrire(_request('exec'))
2385 2384
 		: generer_url_public();
2386 2385
 
2387
-	return "\n<form action='" .
2388
-	$h .
2389
-	"'" .
2390
-	$atts .
2391
-	">\n" .
2392
-	'<div>' .
2393
-	"\n<input type='hidden' name='action' value='$script' />" .
2394
-	$corps .
2386
+	return "\n<form action='".
2387
+	$h.
2388
+	"'".
2389
+	$atts.
2390
+	">\n".
2391
+	'<div>'.
2392
+	"\n<input type='hidden' name='action' value='$script' />".
2393
+	$corps.
2395 2394
 	'</div></form>';
2396 2395
 }
2397 2396
 
@@ -2419,7 +2418,7 @@  discard block
 block discarded – undo
2419 2418
 		: generer_url_public('', '', false, false);
2420 2419
 	$url = parametre_url($url, 'action', $script);
2421 2420
 	if ($args) {
2422
-		$url .= quote_amp('&' . $args);
2421
+		$url .= quote_amp('&'.$args);
2423 2422
 	}
2424 2423
 
2425 2424
 	if ($no_entities) {
@@ -2453,9 +2452,9 @@  discard block
 block discarded – undo
2453 2452
 	}
2454 2453
 	$url =
2455 2454
 		(($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './')
2456
-	. $script . '/'
2455
+	. $script.'/'
2457 2456
 	. ($path ? trim($path, '/') : '')
2458
-	. ($args ? '?' . quote_amp($args) : '');
2457
+	. ($args ? '?'.quote_amp($args) : '');
2459 2458
 
2460 2459
 	if ($no_entities) {
2461 2460
 		$url = str_replace('&amp;', '&', $url);
@@ -2504,17 +2503,17 @@  discard block
 block discarded – undo
2504 2503
 
2505 2504
 	// le nom du repertoire plugins/ activables/desactivables
2506 2505
 	if (!defined('_DIR_PLUGINS')) {
2507
-		define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/');
2506
+		define('_DIR_PLUGINS', _DIR_RACINE.'plugins/');
2508 2507
 	}
2509 2508
 
2510 2509
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2511 2510
 	if (!defined('_DIR_PLUGINS_DIST')) {
2512
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/');
2511
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/');
2513 2512
 	}
2514 2513
 
2515 2514
 	// le nom du repertoire des librairies
2516 2515
 	if (!defined('_DIR_LIB')) {
2517
-		define('_DIR_LIB', _DIR_RACINE . 'lib/');
2516
+		define('_DIR_LIB', _DIR_RACINE.'lib/');
2518 2517
 	}
2519 2518
 
2520 2519
 	if (!defined('_DIR_IMG')) {
@@ -2524,29 +2523,29 @@  discard block
 block discarded – undo
2524 2523
 		define('_DIR_LOGOS', $pa);
2525 2524
 	}
2526 2525
 	if (!defined('_DIR_IMG_ICONES')) {
2527
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/');
2526
+		define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/');
2528 2527
 	}
2529 2528
 
2530 2529
 	if (!defined('_DIR_DUMP')) {
2531
-		define('_DIR_DUMP', $ti . 'dump/');
2530
+		define('_DIR_DUMP', $ti.'dump/');
2532 2531
 	}
2533 2532
 	if (!defined('_DIR_SESSIONS')) {
2534
-		define('_DIR_SESSIONS', $ti . 'sessions/');
2533
+		define('_DIR_SESSIONS', $ti.'sessions/');
2535 2534
 	}
2536 2535
 	if (!defined('_DIR_TRANSFERT')) {
2537
-		define('_DIR_TRANSFERT', $ti . 'upload/');
2536
+		define('_DIR_TRANSFERT', $ti.'upload/');
2538 2537
 	}
2539 2538
 	if (!defined('_DIR_CACHE')) {
2540
-		define('_DIR_CACHE', $ti . 'cache/');
2539
+		define('_DIR_CACHE', $ti.'cache/');
2541 2540
 	}
2542 2541
 	if (!defined('_DIR_CACHE_XML')) {
2543
-		define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/');
2542
+		define('_DIR_CACHE_XML', _DIR_CACHE.'xml/');
2544 2543
 	}
2545 2544
 	if (!defined('_DIR_SKELS')) {
2546
-		define('_DIR_SKELS', _DIR_CACHE . 'skel/');
2545
+		define('_DIR_SKELS', _DIR_CACHE.'skel/');
2547 2546
 	}
2548 2547
 	if (!defined('_DIR_AIDE')) {
2549
-		define('_DIR_AIDE', _DIR_CACHE . 'aide/');
2548
+		define('_DIR_AIDE', _DIR_CACHE.'aide/');
2550 2549
 	}
2551 2550
 	if (!defined('_DIR_TMP')) {
2552 2551
 		define('_DIR_TMP', $ti);
@@ -2575,27 +2574,27 @@  discard block
 block discarded – undo
2575 2574
 	// Declaration des fichiers
2576 2575
 
2577 2576
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2578
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php');
2577
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php');
2579 2578
 	}
2580 2579
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2581
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php');
2580
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php');
2582 2581
 	}
2583 2582
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2584
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php');
2583
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php');
2585 2584
 	}
2586 2585
 	if (!defined('_CACHE_PIPELINES')) {
2587
-		define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php');
2586
+		define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php');
2588 2587
 	}
2589 2588
 	if (!defined('_CACHE_CHEMIN')) {
2590
-		define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt');
2589
+		define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt');
2591 2590
 	}
2592 2591
 
2593 2592
 	# attention .php obligatoire pour ecrire_fichier_securise
2594 2593
 	if (!defined('_FILE_META')) {
2595
-		define('_FILE_META', $ti . 'meta_cache.php');
2594
+		define('_FILE_META', $ti.'meta_cache.php');
2596 2595
 	}
2597 2596
 	if (!defined('_DIR_LOG')) {
2598
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2597
+		define('_DIR_LOG', _DIR_TMP.'log/');
2599 2598
 	}
2600 2599
 	if (!defined('_FILE_LOG')) {
2601 2600
 		define('_FILE_LOG', 'spip');
@@ -2612,8 +2611,8 @@  discard block
 block discarded – undo
2612 2611
 	if (!defined('_FILE_CONNECT')) {
2613 2612
 		define(
2614 2613
 			'_FILE_CONNECT',
2615
-			(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2616
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2614
+			(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2615
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2617 2616
 			: false))
2618 2617
 		);
2619 2618
 	}
@@ -2625,7 +2624,7 @@  discard block
 block discarded – undo
2625 2624
 	if (!defined('_FILE_CHMOD')) {
2626 2625
 		define(
2627 2626
 			'_FILE_CHMOD',
2628
-			(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2627
+			(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2629 2628
 			: false)
2630 2629
 		);
2631 2630
 	}
@@ -2638,10 +2637,10 @@  discard block
 block discarded – undo
2638 2637
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2639 2638
 	}
2640 2639
 	if (!defined('_FILE_CONNECT_TMP')) {
2641
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2640
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2642 2641
 	}
2643 2642
 	if (!defined('_FILE_CHMOD_TMP')) {
2644
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2643
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2645 2644
 	}
2646 2645
 
2647 2646
 	// Definition des droits d'acces en ecriture
@@ -2659,13 +2658,13 @@  discard block
 block discarded – undo
2659 2658
 		define('_DEFAULT_CHARSET', 'utf-8');
2660 2659
 	}
2661 2660
 	if (!defined('_ROOT_PLUGINS')) {
2662
-		define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/');
2661
+		define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/');
2663 2662
 	}
2664 2663
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2665
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/');
2664
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/');
2666 2665
 	}
2667 2666
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2668
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2667
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2669 2668
 	}
2670 2669
 
2671 2670
 	// La taille des Log
@@ -2702,7 +2701,7 @@  discard block
 block discarded – undo
2702 2701
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2703 2702
 	// pour le rendre surchargeable, on va provoquer un reecriture
2704 2703
 	// systematique du noyau ou une baisse de perfs => a etudier)
2705
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2704
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2706 2705
 
2707 2706
 	// charger tout de suite le path et son cache
2708 2707
 	load_path_cache();
@@ -2738,7 +2737,7 @@  discard block
 block discarded – undo
2738 2737
 			!empty($_SERVER['QUERY_STRING'])
2739 2738
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2740 2739
 		) {
2741
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2740
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2742 2741
 		}
2743 2742
 	}
2744 2743
 
@@ -2774,7 +2773,7 @@  discard block
 block discarded – undo
2774 2773
 		) {
2775 2774
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2776 2775
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2777
-				$uri_ref = ($uri_ref['path'] ?? '') . '/';
2776
+				$uri_ref = ($uri_ref['path'] ?? '').'/';
2778 2777
 			} else {
2779 2778
 				$uri_ref = '';
2780 2779
 			}
@@ -2868,7 +2867,7 @@  discard block
 block discarded – undo
2868 2867
 	}
2869 2868
 	if (!defined('_CACHE_RUBRIQUES')) {
2870 2869
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2871
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2870
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2872 2871
 	}
2873 2872
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2874 2873
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -3090,7 +3089,7 @@  discard block
 block discarded – undo
3090 3089
 					}
3091 3090
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
3092 3091
 						spip_log($GLOBALS['visiteur_session']['nom']
3093
-							. ' ' . _VAR_MODE);
3092
+							. ' '._VAR_MODE);
3094 3093
 					}
3095 3094
 				} // pas autorise ?
3096 3095
 				else {
@@ -3105,7 +3104,7 @@  discard block
 block discarded – undo
3105 3104
 						if (strpos($self, 'page=login') === false) {
3106 3105
 							include_spip('inc/headers');
3107 3106
 							$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
3108
-							redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true));
3107
+							redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true));
3109 3108
 						}
3110 3109
 					}
3111 3110
 					// sinon tant pis
@@ -3155,10 +3154,10 @@  discard block
 block discarded – undo
3155 3154
 **/
3156 3155
 function verifier_visiteur() {
3157 3156
 	@spip_initialisation_core(
3158
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3159
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3160
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3161
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3157
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3158
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3159
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3160
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3162 3161
 	);
3163 3162
 
3164 3163
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3191,7 +3190,7 @@  discard block
 block discarded – undo
3191 3190
 	}
3192 3191
 
3193 3192
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3194
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3193
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3195 3194
 		$session = charger_fonction('session', 'inc');
3196 3195
 		if ($session()) {
3197 3196
 			return $GLOBALS['visiteur_session']['statut'];
@@ -3271,7 +3270,7 @@  discard block
 block discarded – undo
3271 3270
 			'definir_session',
3272 3271
 			$GLOBALS['visiteur_session']
3273 3272
 				? serialize($GLOBALS['visiteur_session'])
3274
-				. '_' . @$_COOKIE['spip_session']
3273
+				. '_'.@$_COOKIE['spip_session']
3275 3274
 				: ''
3276 3275
 		);
3277 3276
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3319,8 +3318,8 @@  discard block
 block discarded – undo
3319 3318
 		foreach ($cookies_masques as $k) {
3320 3319
 			if (!empty($_COOKIE[$k])) {
3321 3320
 				$cookies_backup[$k] = $_COOKIE[$k];
3322
-				$_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3323
-				$_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3321
+				$_SERVER['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []);
3322
+				$_ENV['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []);
3324 3323
 				$_COOKIE[$k] = $mask;
3325 3324
 			}
3326 3325
 		}
@@ -3438,11 +3437,11 @@  discard block
 block discarded – undo
3438 3437
 	$GLOBALS['_INC_PUBLIC']++;
3439 3438
 
3440 3439
 	// fix #4235
3441
-	$cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
3440
+	$cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null);
3442 3441
 
3443 3442
 
3444 3443
 	foreach (is_array($fond) ? $fond : [$fond] as $f) {
3445
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3444
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3446 3445
 
3447 3446
 		$page = evaluer_fond($f, $contexte, $connect);
3448 3447
 		if ($page === '') {
@@ -3527,7 +3526,7 @@  discard block
 block discarded – undo
3527 3526
  * @return array|string
3528 3527
  */
3529 3528
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3530
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3529
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3531 3530
 	if (!$pathinfo) {
3532 3531
 		return $f;
3533 3532
 	}
Please login to merge, or discard this patch.
ecrire/inc/distant.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	define('_INC_DISTANT_CONTENT_ENCODING', 'gzip');
27 27
 }
28 28
 if (!defined('_INC_DISTANT_USER_AGENT')) {
29
-	define('_INC_DISTANT_USER_AGENT', 'SPIP-' . $GLOBALS['spip_version_affichee'] . ' (' . $GLOBALS['home_server'] . ')');
29
+	define('_INC_DISTANT_USER_AGENT', 'SPIP-'.$GLOBALS['spip_version_affichee'].' ('.$GLOBALS['home_server'].')');
30 30
 }
31 31
 if (!defined('_INC_DISTANT_MAX_SIZE')) {
32 32
 	define('_INC_DISTANT_MAX_SIZE', 2_097_152);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	define('_INC_DISTANT_CONNECT_TIMEOUT', 10);
36 36
 }
37 37
 
38
-define('_REGEXP_COPIE_LOCALE', ',' 	.
38
+define('_REGEXP_COPIE_LOCALE', ','.
39 39
 	preg_replace(
40 40
 		'@^https?:@',
41 41
 		'https?:',
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 	// si c'est la protection de soi-meme, retourner le path
74 74
 	if ($mode !== 'force' and preg_match(_REGEXP_COPIE_LOCALE, $source, $match)) {
75
-		$source = substr(_DIR_IMG, strlen(_DIR_RACINE)) . urldecode($match[1]);
75
+		$source = substr(_DIR_IMG, strlen(_DIR_RACINE)).urldecode($match[1]);
76 76
 
77 77
 		return @file_exists($source) ? $source : false;
78 78
 	}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		return false;
93 93
 	}
94 94
 
95
-	$localrac = _DIR_RACINE . $local;
95
+	$localrac = _DIR_RACINE.$local;
96 96
 	$t = ($mode === 'force') ? false : @file_exists($localrac);
97 97
 
98 98
 	// test d'existence du fichier
@@ -112,18 +112,18 @@  discard block
 block discarded – undo
112 112
 		if (!$taille_max) {
113 113
 			$taille_max = _COPIE_LOCALE_MAX_SIZE;
114 114
 		}
115
-		$localrac_tmp = $localrac . '.tmp';
115
+		$localrac_tmp = $localrac.'.tmp';
116 116
 		$res = recuperer_url(
117 117
 			$source,
118 118
 			['file' => $localrac_tmp, 'taille_max' => $taille_max, 'if_modified_since' => $t ? filemtime($localrac) : '']
119 119
 		);
120 120
 
121 121
 		if (!$res or (!$res['length'] and $res['status'] != 304)) {
122
-			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : " . ($res ? $res['status'] : '-'), 'distant' . _LOG_INFO_IMPORTANTE);
122
+			spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : ".($res ? $res['status'] : '-'), 'distant'._LOG_INFO_IMPORTANTE);
123 123
 			@unlink($localrac_tmp);
124 124
 		}
125 125
 		else {
126
-			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille " . $res['length'] . ' status ' . $res['status'], 'distant');
126
+			spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille ".$res['length'].' status '.$res['status'], 'distant');
127 127
 		}
128 128
 		if (!$res or !$res['length']) {
129 129
 			// si $t c'est sans doute juste un not-modified-since
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			and is_callable($callback_valider_url)
137 137
 			and !$callback_valider_url($res['url'])
138 138
 		) {
139
-			spip_log('copie_locale : url finale ' . $res['url'] . " non valide, on refuse le fichier $localrac_tmp", 'distant' . _LOG_INFO_IMPORTANTE);
139
+			spip_log('copie_locale : url finale '.$res['url']." non valide, on refuse le fichier $localrac_tmp", 'distant'._LOG_INFO_IMPORTANTE);
140 140
 			@unlink($localrac_tmp);
141 141
 			return $t ? $local : false;
142 142
 		}
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
 	if (!$is_known_host) {
229 229
 		$host = trim($parsed_url['host'], '.');
230
-		if (! $ip = filter_var($host, FILTER_VALIDATE_IP)) {
230
+		if (!$ip = filter_var($host, FILTER_VALIDATE_IP)) {
231 231
 			$ip = gethostbyname($host);
232 232
 			if ($ip === $host) {
233 233
 				// Error condition for gethostbyname()
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			}
249 249
 		}
250 250
 		if ($ip) {
251
-			if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
251
+			if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)) {
252 252
 				return false;
253 253
 			}
254 254
 		}
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	}
260 260
 
261 261
 	$port = $parsed_url['port'];
262
-	if ($port === 80  or $port === 443  or $port === 8080) {
262
+	if ($port === 80 or $port === 443 or $port === 8080) {
263 263
 		return $url;
264 264
 	}
265 265
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 				}
330 330
 			}
331 331
 			if ($taille > 500) {
332
-				$boundary = substr(md5(random_int(0, mt_getrandmax()) . 'spip'), 0, 8);
332
+				$boundary = substr(md5(random_int(0, mt_getrandmax()).'spip'), 0, 8);
333 333
 			}
334 334
 		}
335 335
 
@@ -357,16 +357,16 @@  discard block
 block discarded – undo
357 357
 			}
358 358
 		} else {
359 359
 			// fabrique une chaine HTTP simple pour un POST
360
-			$entete = 'Content-Type: application/x-www-form-urlencoded' . "\r\n";
360
+			$entete = 'Content-Type: application/x-www-form-urlencoded'."\r\n";
361 361
 			$chaine = [];
362 362
 			if (is_array($donnees)) {
363 363
 				foreach ($donnees as $cle => $valeur) {
364 364
 					if (is_array($valeur)) {
365 365
 						foreach ($valeur as $val2) {
366
-							$chaine[] = rawurlencode($cle) . '[]=' . rawurlencode($val2);
366
+							$chaine[] = rawurlencode($cle).'[]='.rawurlencode($val2);
367 367
 						}
368 368
 					} else {
369
-						$chaine[] = rawurlencode($cle) . '=' . rawurlencode($valeur);
369
+						$chaine[] = rawurlencode($cle).'='.rawurlencode($valeur);
370 370
 					}
371 371
 				}
372 372
 				$chaine = implode('&', $chaine);
@@ -471,13 +471,13 @@  discard block
 block discarded – undo
471 471
 		$options['taille_max'] = $copy ? _COPIE_LOCALE_MAX_SIZE : _INC_DISTANT_MAX_SIZE;
472 472
 	}
473 473
 
474
-	spip_log('recuperer_url ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
474
+	spip_log('recuperer_url '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
475 475
 
476 476
 	// Ajout des en-têtes spécifiques si besoin
477 477
 	$formatted_data = '';
478 478
 	if (!empty($options['headers'])) {
479 479
 		foreach ($options['headers'] as $champ => $valeur) {
480
-			$formatted_data .= $champ . ': ' . $valeur . "\r\n";
480
+			$formatted_data .= $champ.': '.$valeur."\r\n";
481 481
 		}
482 482
 	}
483 483
 
@@ -485,9 +485,9 @@  discard block
 block discarded – undo
485 485
 		[$head, $postdata] = prepare_donnees_post($options['datas'], $options['boundary']);
486 486
 		$head .= $formatted_data;
487 487
 		if (stripos($head, 'Content-Length:') === false) {
488
-			$head .= 'Content-Length: ' . strlen($postdata) . "\r\n";
488
+			$head .= 'Content-Length: '.strlen($postdata)."\r\n";
489 489
 		}
490
-		$formatted_data = $head . "\r\n" . $postdata;
490
+		$formatted_data = $head."\r\n".$postdata;
491 491
 		if (
492 492
 			strlen($postdata)
493 493
 			and !$methode_demandee
@@ -501,9 +501,9 @@  discard block
 block discarded – undo
501 501
 	// Accepter les URLs au format feed:// ou qui ont oublie le http:// ou les urls relatives au protocole
502 502
 	$url = preg_replace(',^feed://,i', 'http://', $url);
503 503
 	if (!tester_url_absolue($url)) {
504
-		$url = 'http://' . $url;
504
+		$url = 'http://'.$url;
505 505
 	} elseif (strncmp($url, '//', 2) == 0) {
506
-		$url = 'http:' . $url;
506
+		$url = 'http:'.$url;
507 507
 	}
508 508
 
509 509
 	$url = url_to_ascii($url);
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 		$options['if_modified_since']
533 533
 	);
534 534
 	if (!$handle) {
535
-		spip_log("ECHEC init_http $url", 'distant' . _LOG_ERREUR);
535
+		spip_log("ECHEC init_http $url", 'distant'._LOG_ERREUR);
536 536
 
537 537
 		return false;
538 538
 	}
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 					'status' => 200,
563 563
 				];
564 564
 			} else {
565
-				spip_log("ECHEC chinoiserie $url", 'distant' . _LOG_ERREUR);
565
+				spip_log("ECHEC chinoiserie $url", 'distant'._LOG_ERREUR);
566 566
 				return false;
567 567
 			}
568 568
 		} elseif ($res['location'] and $options['follow_location']) {
@@ -578,11 +578,11 @@  discard block
 block discarded – undo
578 578
 					$options['datas'] = '';
579 579
 				}
580 580
 			}
581
-			spip_log('recuperer_url recommence ' . $options['methode'] . " sur $url", 'distant' . _LOG_DEBUG);
581
+			spip_log('recuperer_url recommence '.$options['methode']." sur $url", 'distant'._LOG_DEBUG);
582 582
 
583 583
 			return recuperer_url($url, $options);
584 584
 		} elseif ($res['status'] !== 200) {
585
-			spip_log('HTTP status ' . $res['status'] . " pour $url", 'distant');
585
+			spip_log('HTTP status '.$res['status']." pour $url", 'distant');
586 586
 		}
587 587
 		$result['status'] = $res['status'];
588 588
 		if (isset($res['headers'])) {
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
 
599 599
 	// on ne veut que les entetes
600 600
 	if (!$options['taille_max'] or $options['methode'] == 'HEAD' or $result['status'] == '304') {
601
-		spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($result), 'distant' . _LOG_DEBUG);
601
+		spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($result), 'distant'._LOG_DEBUG);
602 602
 		return $result;
603 603
 	}
604 604
 
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 
609 609
 	$gz = false;
610 610
 	if (preg_match(",\bContent-Encoding: .*gzip,is", $result['headers'])) {
611
-		$gz = (_DIR_TMP . md5(uniqid(random_int(0, mt_getrandmax()))) . '.tmp.gz');
611
+		$gz = (_DIR_TMP.md5(uniqid(random_int(0, mt_getrandmax()))).'.tmp.gz');
612 612
 	}
613 613
 
614 614
 	// si on a pas deja recuperer le contenu par une methode detournee
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 
645 645
 	$trace = json_decode(json_encode($result), true);
646 646
 	$trace['page'] = '...';
647
-	spip_log('RESULTAT recuperer_url ' . $options['methode'] . " sur $url : " . json_encode($trace), 'distant' . _LOG_DEBUG);
647
+	spip_log('RESULTAT recuperer_url '.$options['methode']." sur $url : ".json_encode($trace), 'distant'._LOG_DEBUG);
648 648
 
649 649
 	return $result;
650 650
 }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 	$sig['url'] = $url;
699 699
 
700 700
 	$dir = sous_repertoire(_DIR_CACHE, 'curl');
701
-	$cache = md5(serialize($sig)) . '-' . substr(preg_replace(',\W+,', '_', $url), 0, 80);
701
+	$cache = md5(serialize($sig)).'-'.substr(preg_replace(',\W+,', '_', $url), 0, 80);
702 702
 	$sub = sous_repertoire($dir, substr($cache, 0, 2));
703 703
 	$cache = "$sub$cache";
704 704
 
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 	$fp = false;
753 753
 	if ($fichier) {
754 754
 		include_spip('inc/acces');
755
-		$tmpfile = "$fichier." . creer_uniqid() . '.tmp';
755
+		$tmpfile = "$fichier.".creer_uniqid().'.tmp';
756 756
 		$fp = spip_fopen_lock($tmpfile, 'w', LOCK_EX);
757 757
 		if (!$fp and file_exists($fichier)) {
758 758
 			return filesize($fichier);
@@ -811,7 +811,7 @@  discard block
 block discarded – undo
811 811
 	}
812 812
 	$result['status'] = intval($r[1]);
813 813
 	while ($s = trim(fgets($handle, 16384))) {
814
-		$result['headers'][] = $s . "\n";
814
+		$result['headers'][] = $s."\n";
815 815
 		preg_match(',^([^:]*): *(.*)$,i', $s, $r);
816 816
 		[, $d, $v] = $r;
817 817
 		if (strtolower(trim($d)) == 'location' and $result['status'] >= 300 and $result['status'] < 400) {
@@ -860,13 +860,13 @@  discard block
 block discarded – undo
860 860
 
861 861
 	// on se place tout le temps comme si on etait a la racine
862 862
 	if (_DIR_RACINE) {
863
-		$d = preg_replace(',^' . preg_quote(_DIR_RACINE) . ',', '', $d);
863
+		$d = preg_replace(',^'.preg_quote(_DIR_RACINE).',', '', $d);
864 864
 	}
865 865
 
866 866
 	$m = md5($source);
867 867
 
868 868
 	return $d
869
-	. substr(preg_replace(',[^\w-],', '', basename($source)) . '-' . $m, 0, 12)
869
+	. substr(preg_replace(',[^\w-],', '', basename($source)).'-'.$m, 0, 12)
870 870
 	. substr($m, 0, 4)
871 871
 	. ".$extension";
872 872
 }
@@ -889,7 +889,7 @@  discard block
 block discarded – undo
889 889
 	// Si c'est deja local pas de souci
890 890
 	if (!tester_url_absolue($source)) {
891 891
 		if (_DIR_RACINE) {
892
-			$source = preg_replace(',^' . preg_quote(_DIR_RACINE) . ',', '', $source);
892
+			$source = preg_replace(',^'.preg_quote(_DIR_RACINE).',', '', $source);
893 893
 		}
894 894
 
895 895
 		return $source;
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
 		$ext
908 908
 		and preg_match(',^\w+$,', $ext) // pas de php?truc=1&...
909 909
 		and $f = nom_fichier_copie_locale($source, $ext)
910
-		and file_exists(_DIR_RACINE . $f)
910
+		and file_exists(_DIR_RACINE.$f)
911 911
 	) {
912 912
 		return $f;
913 913
 	}
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
 
916 916
 	// Si c'est deja dans la table des documents,
917 917
 	// ramener le nom de sa copie potentielle
918
-	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier=' . sql_quote($source) . " AND distant='oui' AND extension <> ''");
918
+	$ext = sql_getfetsel('extension', 'spip_documents', 'fichier='.sql_quote($source)." AND distant='oui' AND extension <> ''");
919 919
 
920 920
 	if ($ext) {
921 921
 		return nom_fichier_copie_locale($source, $ext);
@@ -926,9 +926,9 @@  discard block
 block discarded – undo
926 926
 
927 927
 	$ext = $path_parts ? $path_parts['extension'] : '';
928 928
 
929
-	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
929
+	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
930 930
 		$f = nom_fichier_copie_locale($source, $ext);
931
-		if (file_exists(_DIR_RACINE . $f)) {
931
+		if (file_exists(_DIR_RACINE.$f)) {
932 932
 			return $f;
933 933
 		}
934 934
 	}
@@ -936,7 +936,7 @@  discard block
 block discarded – undo
936 936
 	// Ping  pour voir si son extension est connue et autorisee
937 937
 	// avec mise en cache du resultat du ping
938 938
 
939
-	$cache = sous_repertoire(_DIR_CACHE, 'rid') . md5($source);
939
+	$cache = sous_repertoire(_DIR_CACHE, 'rid').md5($source);
940 940
 	if (
941 941
 		!@file_exists($cache)
942 942
 		or !$path_parts = @unserialize(spip_file_get_contents($cache))
@@ -946,10 +946,10 @@  discard block
 block discarded – undo
946 946
 		ecrire_fichier($cache, serialize($path_parts));
947 947
 	}
948 948
 	$ext = !empty($path_parts['extension']) ? $path_parts['extension'] : '';
949
-	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension=' . sql_quote($ext))) {
949
+	if ($ext and sql_getfetsel('extension', 'spip_types_documents', 'extension='.sql_quote($ext))) {
950 950
 		return nom_fichier_copie_locale($source, $ext);
951 951
 	}
952
-	spip_log("pas de copie locale pour $source", 'distant' . _LOG_ERREUR);
952
+	spip_log("pas de copie locale pour $source", 'distant'._LOG_ERREUR);
953 953
 }
954 954
 
955 955
 
@@ -1047,7 +1047,7 @@  discard block
 block discarded – undo
1047 1047
 		} else {
1048 1048
 			if ($a['body']) {
1049 1049
 				$a['extension'] = $extension;
1050
-				$a['fichier'] = _DIR_RACINE . nom_fichier_copie_locale($source, $extension);
1050
+				$a['fichier'] = _DIR_RACINE.nom_fichier_copie_locale($source, $extension);
1051 1051
 				ecrire_fichier($a['fichier'], $a['body']);
1052 1052
 				$size_image = @spip_getimagesize($a['fichier']);
1053 1053
 				$a['largeur'] = intval($size_image[0]);
@@ -1115,20 +1115,20 @@  discard block
 block discarded – undo
1115 1115
 			!$t
1116 1116
 			and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)
1117 1117
 		) {
1118
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1118
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1119 1119
 		}
1120 1120
 		if (
1121 1121
 			!$t
1122 1122
 			and preg_match(',^Content-Disposition:\s*attachment;\s*filename=(.*)$,Uims', $headers, $m)
1123 1123
 			and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $m[1], $rext)
1124 1124
 		) {
1125
-			$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1125
+			$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1126 1126
 		}
1127 1127
 	}
1128 1128
 
1129 1129
 	// Autre mime/type (ou text/plain avec fichier d'extension inconnue)
1130 1130
 	if (!$t) {
1131
-		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type=' . sql_quote($mime_type));
1131
+		$t = sql_fetsel('extension', 'spip_types_documents', 'mime_type='.sql_quote($mime_type));
1132 1132
 	}
1133 1133
 
1134 1134
 	// Toujours rien ? (ex: audio/x-ogg au lieu de application/ogg)
@@ -1139,11 +1139,11 @@  discard block
 block discarded – undo
1139 1139
 		and preg_match(',\.([a-z0-9]+)(\?.*)?$,i', $source, $rext)
1140 1140
 	) {
1141 1141
 		# eviter xxx.3 => 3gp (> SPIP 3)
1142
-		$t = sql_fetsel('extension', 'spip_types_documents', 'extension=' . sql_quote(corriger_extension($rext[1]), '', 'text'));
1142
+		$t = sql_fetsel('extension', 'spip_types_documents', 'extension='.sql_quote(corriger_extension($rext[1]), '', 'text'));
1143 1143
 	}
1144 1144
 
1145 1145
 	if ($t) {
1146
-		spip_log("mime-type $mime_type ok, extension " . $t['extension'], 'distant');
1146
+		spip_log("mime-type $mime_type ok, extension ".$t['extension'], 'distant');
1147 1147
 		return $t['extension'];
1148 1148
 	} else {
1149 1149
 		# par defaut on retombe sur '.bin' si c'est autorise
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 		}
1247 1247
 	} else {
1248 1248
 		$scheme = $t['scheme'];
1249
-		$noproxy = $scheme . '://';
1249
+		$noproxy = $scheme.'://';
1250 1250
 	}
1251 1251
 	if (isset($t['user'])) {
1252 1252
 		$user = [$t['user'], $t['pass']];
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
 	}
1261 1261
 
1262 1262
 	if (!empty($t['query'])) {
1263
-		$path .= '?' . $t['query'];
1263
+		$path .= '?'.$t['query'];
1264 1264
 	}
1265 1265
 
1266 1266
 	$f = lance_requete($method, $scheme, $user, $host, $path, $port, $noproxy, $refuse_gz, $referer, $datas, $vers, $date);
@@ -1334,29 +1334,29 @@  discard block
 block discarded – undo
1334 1334
 	$proxy_user = '';
1335 1335
 	$http_proxy = need_proxy($host);
1336 1336
 	if ($user) {
1337
-		$user = urlencode($user[0]) . ':' . urlencode($user[1]);
1337
+		$user = urlencode($user[0]).':'.urlencode($user[1]);
1338 1338
 	}
1339 1339
 
1340 1340
 	$connect = '';
1341 1341
 	if ($http_proxy) {
1342
-		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') and in_array($scheme, ['tls','ssl'])) {
1343
-			$path_host = (!$user ? '' : "$user@") . $host . (($port != 80) ? ":$port" : '');
1344
-			$connect = 'CONNECT ' . $path_host . " $vers\r\n"
1342
+		if (!defined('_PROXY_HTTPS_NOT_VIA_CONNECT') and in_array($scheme, ['tls', 'ssl'])) {
1343
+			$path_host = (!$user ? '' : "$user@").$host.(($port != 80) ? ":$port" : '');
1344
+			$connect = 'CONNECT '.$path_host." $vers\r\n"
1345 1345
 				. "Host: $path_host\r\n"
1346 1346
 				. "Proxy-Connection: Keep-Alive\r\n";
1347 1347
 		} else {
1348
-			$path = (in_array($scheme, ['tls','ssl']) ? 'https://' : "$scheme://")
1348
+			$path = (in_array($scheme, ['tls', 'ssl']) ? 'https://' : "$scheme://")
1349 1349
 				. (!$user ? '' : "$user@")
1350
-				. "$host" . (($port != 80) ? ":$port" : '') . $path;
1350
+				. "$host".(($port != 80) ? ":$port" : '').$path;
1351 1351
 		}
1352 1352
 		$t2 = @parse_url($http_proxy);
1353 1353
 		$first_host = $t2['host'];
1354 1354
 		$port = ($t2['port'] ?? null) ?: 80;
1355 1355
 		if ($t2['user'] ?? null) {
1356
-			$proxy_user = base64_encode($t2['user'] . ':' . $t2['pass']);
1356
+			$proxy_user = base64_encode($t2['user'].':'.$t2['pass']);
1357 1357
 		}
1358 1358
 	} else {
1359
-		$first_host = $noproxy . $host;
1359
+		$first_host = $noproxy.$host;
1360 1360
 	}
1361 1361
 
1362 1362
 	if ($connect) {
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
 		);
1379 1379
 		spip_log("Recuperer $path sur $first_host:$port par $f (via CONNECT)", 'connect');
1380 1380
 		if (!$f) {
1381
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1381
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1382 1382
 			return $errno;
1383 1383
 		}
1384 1384
 		stream_set_timeout($f, _INC_DISTANT_CONNECT_TIMEOUT);
@@ -1391,7 +1391,7 @@  discard block
 block discarded – undo
1391 1391
 			or !count($res = explode(' ', $res))
1392 1392
 			or $res[1] !== '200'
1393 1393
 		) {
1394
-			spip_log("Echec CONNECT sur $first_host:$port", 'connect' . _LOG_INFO_IMPORTANTE);
1394
+			spip_log("Echec CONNECT sur $first_host:$port", 'connect'._LOG_INFO_IMPORTANTE);
1395 1395
 			fclose($f);
1396 1396
 
1397 1397
 			return false;
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
 		} while (!$f and $ntry-- and $errno !== 110 and sleep(1));
1409 1409
 		spip_log("Recuperer $path sur $first_host:$port par $f");
1410 1410
 		if (!$f) {
1411
-			spip_log("Erreur connexion $errno $errstr", 'distant' . _LOG_ERREUR);
1411
+			spip_log("Erreur connexion $errno $errstr", 'distant'._LOG_ERREUR);
1412 1412
 
1413 1413
 			return $errno;
1414 1414
 		}
@@ -1418,16 +1418,16 @@  discard block
 block discarded – undo
1418 1418
 	$site = $GLOBALS['meta']['adresse_site'] ?? '';
1419 1419
 
1420 1420
 	$host_port = $host;
1421
-	if ($port != (in_array($scheme, ['tls','ssl']) ? 443 : 80)) {
1421
+	if ($port != (in_array($scheme, ['tls', 'ssl']) ? 443 : 80)) {
1422 1422
 		$host_port .= ":$port";
1423 1423
 	}
1424 1424
 	$req = "$method $path $vers\r\n"
1425 1425
 		. "Host: $host_port\r\n"
1426
-		. 'User-Agent: ' . _INC_DISTANT_USER_AGENT . "\r\n"
1427
-		. ($refuse_gz ? '' : ('Accept-Encoding: ' . _INC_DISTANT_CONTENT_ENCODING . "\r\n"))
1426
+		. 'User-Agent: '._INC_DISTANT_USER_AGENT."\r\n"
1427
+		. ($refuse_gz ? '' : ('Accept-Encoding: '._INC_DISTANT_CONTENT_ENCODING."\r\n"))
1428 1428
 		. (!$site ? '' : "Referer: $site/$referer\r\n")
1429
-		. (!$date ? '' : 'If-Modified-Since: ' . (gmdate('D, d M Y H:i:s', $date) . " GMT\r\n"))
1430
-		. (!$user ? '' : ('Authorization: Basic ' . base64_encode($user) . "\r\n"))
1429
+		. (!$date ? '' : 'If-Modified-Since: '.(gmdate('D, d M Y H:i:s', $date)." GMT\r\n"))
1430
+		. (!$user ? '' : ('Authorization: Basic '.base64_encode($user)."\r\n"))
1431 1431
 		. (!$proxy_user ? '' : "Proxy-Authorization: Basic $proxy_user\r\n")
1432 1432
 		. (!strpos($vers, '1.1') ? '' : "Keep-Alive: 300\r\nConnection: keep-alive\r\n");
1433 1433
 
Please login to merge, or discard this patch.
ecrire/install/etape_ldap2.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$adresse_ldap = filter_var($adresse_ldap, FILTER_SANITIZE_URL) ?: '';
49 49
 
50 50
 	$ldap_link = ldap_connect($adresse_ldap, $port_ldap);
51
-	$erreur = 'ldap_connect(' . spip_htmlspecialchars($adresse_ldap) . ', ' . spip_htmlspecialchars($port_ldap) . ')';
51
+	$erreur = 'ldap_connect('.spip_htmlspecialchars($adresse_ldap).', '.spip_htmlspecialchars($port_ldap).')';
52 52
 
53 53
 	if ($ldap_link) {
54 54
 		if (!ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap)) {
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 		}
58 58
 		if ($tls === true) {
59 59
 			if (!ldap_start_tls($ldap_link)) {
60
-				$erreur = 'ldap_start_tls(' . spip_htmlspecialchars($ldap_link)
61
-					. ' ' . spip_htmlspecialchars($adresse_ldap)
62
-					. ', ' . spip_htmlspecialchars($port_ldap) . ')';
60
+				$erreur = 'ldap_start_tls('.spip_htmlspecialchars($ldap_link)
61
+					. ' '.spip_htmlspecialchars($adresse_ldap)
62
+					. ', '.spip_htmlspecialchars($port_ldap).')';
63 63
 				$ldap_link = false;
64 64
 			}
65 65
 		}
66 66
 		if ($ldap_link) {
67 67
 			$ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap);
68
-			$erreur = "ldap_bind('" . spip_htmlspecialchars($ldap_link)
69
-				. "', '" . spip_htmlspecialchars($login_ldap)
70
-				. "', '" . spip_htmlspecialchars($pass_ldap)
71
-				. "'): " . spip_htmlspecialchars($adresse_ldap)
72
-				. ', ' . spip_htmlspecialchars($port_ldap);
68
+			$erreur = "ldap_bind('".spip_htmlspecialchars($ldap_link)
69
+				. "', '".spip_htmlspecialchars($login_ldap)
70
+				. "', '".spip_htmlspecialchars($pass_ldap)
71
+				. "'): ".spip_htmlspecialchars($adresse_ldap)
72
+				. ', '.spip_htmlspecialchars($port_ldap);
73 73
 		}
74 74
 	}
75 75
 
@@ -77,22 +77,22 @@  discard block
 block discarded – undo
77 77
 		echo info_etape(
78 78
 			_T('titre_connexion_ldap'),
79 79
 			info_progression_etape(2, 'etape_ldap', 'install/')
80
-		),  _T('info_connexion_ldap_ok');
80
+		), _T('info_connexion_ldap_ok');
81 81
 		echo generer_form_ecrire('install', (
82 82
 			"\n<input type='hidden' name='etape' value='ldap3' />"
83
-			. "\n<input type='hidden' name='adresse_ldap' value=\"" . spip_htmlspecialchars($adresse_ldap) . '" />'
84
-			. "\n<input type='hidden' name='port_ldap' value=\"" . spip_htmlspecialchars($port_ldap) . '" />'
85
-			. "\n<input type='hidden' name='login_ldap' value=\"" . spip_htmlspecialchars($login_ldap) . '" />'
86
-			. "\n<input type='hidden' name='pass_ldap' value=\"" . spip_htmlspecialchars($pass_ldap) . '" />'
87
-			. "\n<input type='hidden' name='protocole_ldap' value=\"" . spip_htmlspecialchars($protocole_ldap) . '" />'
88
-			. "\n<input type='hidden' name='tls_ldap' value=\"" . spip_htmlspecialchars($tls_ldap) . '" />'
83
+			. "\n<input type='hidden' name='adresse_ldap' value=\"".spip_htmlspecialchars($adresse_ldap).'" />'
84
+			. "\n<input type='hidden' name='port_ldap' value=\"".spip_htmlspecialchars($port_ldap).'" />'
85
+			. "\n<input type='hidden' name='login_ldap' value=\"".spip_htmlspecialchars($login_ldap).'" />'
86
+			. "\n<input type='hidden' name='pass_ldap' value=\"".spip_htmlspecialchars($pass_ldap).'" />'
87
+			. "\n<input type='hidden' name='protocole_ldap' value=\"".spip_htmlspecialchars($protocole_ldap).'" />'
88
+			. "\n<input type='hidden' name='tls_ldap' value=\"".spip_htmlspecialchars($tls_ldap).'" />'
89 89
 			. bouton_suivant()));
90 90
 	} else {
91 91
 		echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true),
92
-			"<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . '</p>',
93
-			'<p>' . _T('avis_connexion_ldap_echec_2') .
94
-			"<br />\n" . _T('avis_connexion_ldap_echec_3') .
95
-			'<br /><br />' . $erreur . '<b> ?</b></p></div>';
92
+			"<div class='error'><p>"._T('avis_connexion_ldap_echec_1').'</p>',
93
+			'<p>'._T('avis_connexion_ldap_echec_2').
94
+			"<br />\n"._T('avis_connexion_ldap_echec_3').
95
+			'<br /><br />'.$erreur.'<b> ?</b></p></div>';
96 96
 	}
97 97
 
98 98
 	echo install_fin_html();
Please login to merge, or discard this patch.
ecrire/install/etape_3.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, '', $server_db);
45 45
 
46 46
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
47
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
47
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
48 48
 
49 49
 	$fquery = sql_serveur('query', $server_db);
50 50
 	if ($choix_db == 'new_spip') {
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 			if (!$ok) {
55 55
 				$re = "Impossible de creer la base $re";
56 56
 				spip_log($re);
57
-				return '<p>' . _T('avis_connexion_erreur_creer_base') . "</p><!--\n$re\n-->";
57
+				return '<p>'._T('avis_connexion_erreur_creer_base')."</p><!--\n$re\n-->";
58 58
 			}
59 59
 		} else {
60 60
 			$re = "Le nom de la base doit correspondre a $re";
61 61
 			spip_log($re);
62 62
 
63
-			return '<p>' . _T('avis_connexion_erreur_nom_base') . "</p><!--\n$re\n-->";
63
+			return '<p>'._T('avis_connexion_erreur_nom_base')."</p><!--\n$re\n-->";
64 64
 		}
65 65
 	}
66 66
 
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
 		= spip_connect_db($adresse_db, $port, $login_db, $pass_db, $sel_db, $server_db);
72 72
 
73 73
 	$GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']]
74
-		= $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']];
74
+		= $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']];
75 75
 
76 76
 	// Completer le tableau decrivant la connexion
77 77
 
78 78
 	$GLOBALS['connexions'][$server_db]['prefixe'] = $table_prefix;
79 79
 	$GLOBALS['connexions'][$server_db]['db'] = $sel_db;
80 80
 
81
-	$old = sql_showbase($table_prefix . '_meta', $server_db);
81
+	$old = sql_showbase($table_prefix.'_meta', $server_db);
82 82
 	if ($old) {
83 83
 		$old = sql_fetch($old, $server_db);
84 84
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 				$charset['charset'];
98 98
 			$charsetbase = $charset['charset'];
99 99
 		} else {
100
-			spip_log(_DEFAULT_CHARSET . ' inconnu du serveur SQL');
100
+			spip_log(_DEFAULT_CHARSET.' inconnu du serveur SQL');
101 101
 			$charsetbase = 'standard';
102 102
 		}
103 103
 		spip_log("Creation des tables. Codage $charsetbase");
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		if ($r) {
148 148
 			$r = sql_fetch($r, $server_db);
149 149
 		}
150
-		$version_installee = !$r ? 0 : (double)$r['valeur'];
150
+		$version_installee = !$r ? 0 : (double) $r['valeur'];
151 151
 		if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) {
152 152
 			$fupdateq(
153 153
 				'spip_meta',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 				'',
157 157
 				$server_db
158 158
 			);
159
-			spip_log('nouvelle version installee: ' . $GLOBALS['spip_version_base']);
159
+			spip_log('nouvelle version installee: '.$GLOBALS['spip_version_base']);
160 160
 		}
161 161
 		// eliminer la derniere operation d'admin mal terminee
162 162
 		// notamment la mise a jour
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	if ($chmod_db) {
184 184
 		install_fichier_connexion(
185 185
 			_FILE_CHMOD_TMP,
186
-			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', " . sprintf('0%3o', $chmod_db) . ");\n"
186
+			"if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', ".sprintf('0%3o', $chmod_db).");\n"
187 187
 		);
188 188
 	}
189 189
 
@@ -246,16 +246,16 @@  discard block
 block discarded – undo
246 246
 
247 247
 
248 248
 function install_premier_auteur($email, $login, $nom, $pass, $hidden, $auteur_obligatoire) {
249
-	return info_progression_etape(3, 'etape_', 'install/') .
249
+	return info_progression_etape(3, 'etape_', 'install/').
250 250
 	info_etape(
251 251
 		_T('info_informations_personnelles'),
252
-		'<b>' . _T('texte_informations_personnelles_1') . '</b>' .
253
-		aider('install5', true) .
254
-		'<p>' .
252
+		'<b>'._T('texte_informations_personnelles_1').'</b>'.
253
+		aider('install5', true).
254
+		'<p>'.
255 255
 		($auteur_obligatoire ?
256 256
 			''
257 257
 			:
258
-			_T('texte_informations_personnelles_2') . ' ' . _T('info_laisser_champs_vides')
258
+			_T('texte_informations_personnelles_2').' '._T('info_laisser_champs_vides')
259 259
 		)
260 260
 	)
261 261
 	. generer_form_ecrire('install', (
@@ -265,12 +265,12 @@  discard block
 block discarded – undo
265 265
 			_T('info_identification_publique'),
266 266
 			[
267 267
 				'nom' => [
268
-					'label' => '<b>' . _T('entree_signature') . "</b><br />\n" . _T('entree_nom_pseudo_1') . "\n",
268
+					'label' => '<b>'._T('entree_signature')."</b><br />\n"._T('entree_nom_pseudo_1')."\n",
269 269
 					'valeur' => $nom,
270 270
 					'required' => $auteur_obligatoire,
271 271
 				],
272 272
 				'email' => [
273
-					'label' => '<b>' . _T('entree_adresse_email') . "</b>\n",
273
+					'label' => '<b>'._T('entree_adresse_email')."</b>\n",
274 274
 					'valeur' => $email,
275 275
 				]
276 276
 			]
@@ -280,23 +280,23 @@  discard block
 block discarded – undo
280 280
 			_T('entree_identifiants_connexion'),
281 281
 			[
282 282
 				'login' => [
283
-					'label' => '<b>' . _T('entree_login') . "</b><br />\n" . _T(
283
+					'label' => '<b>'._T('entree_login')."</b><br />\n"._T(
284 284
 						'info_login_trop_court_car_pluriel',
285 285
 						['nb' => _LOGIN_TROP_COURT]
286
-					) . "\n",
286
+					)."\n",
287 287
 					'valeur' => $login,
288 288
 					'required' => $auteur_obligatoire,
289 289
 				],
290 290
 				'pass' => [
291
-					'label' => '<b>' . _T('entree_mot_passe') . "</b><br />\n" . _T(
291
+					'label' => '<b>'._T('entree_mot_passe')."</b><br />\n"._T(
292 292
 						'info_passe_trop_court_car_pluriel',
293 293
 						['nb' => _PASS_LONGUEUR_MINI]
294
-					) . "\n",
294
+					)."\n",
295 295
 					'valeur' => $pass,
296 296
 					'required' => $auteur_obligatoire,
297 297
 				],
298 298
 				'pass_verif' => [
299
-					'label' => '<b>' . _T('info_confirmer_passe') . "</b><br />\n",
299
+					'label' => '<b>'._T('info_confirmer_passe')."</b><br />\n",
300 300
 					'valeur' => $pass,
301 301
 					'required' => $auteur_obligatoire,
302 302
 				]
@@ -340,9 +340,9 @@  discard block
 block discarded – undo
340 340
 
341 341
 		if ($res) {
342 342
 			$res = info_progression_etape(2, 'etape_', 'install/', true)
343
-				. "<div class='error'><h3>" . _T('avis_operation_echec') . '</h3>'
343
+				. "<div class='error'><h3>"._T('avis_operation_echec').'</h3>'
344 344
 				. $res
345
-				. '<p>' . _T('texte_operation_echec') . '</p>'
345
+				. '<p>'._T('texte_operation_echec').'</p>'
346 346
 				. '</div>';
347 347
 		}
348 348
 	} else {
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
 		$hidden = predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db)
368 368
 			. (defined('_INSTALL_NAME_DB') ? ''
369
-				: "\n<input type='hidden' name='sel_db' value=\"" . spip_htmlspecialchars($sel_db) . '" />');
369
+				: "\n<input type='hidden' name='sel_db' value=\"".spip_htmlspecialchars($sel_db).'" />');
370 370
 
371 371
 		$auteur_obligatoire = ($ldap_present ? 0 : !sql_countsel('spip_auteurs', '', '', '', $server_db));
372 372
 
Please login to merge, or discard this patch.
ecrire/inc/filtres_mini.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	if ($query) {
48
-		$url .= '?' . $query;
48
+		$url .= '?'.$query;
49 49
 	}
50 50
 
51
-	return '/' . preg_replace(',^/,S', '', $url);
51
+	return '/'.preg_replace(',^/,S', '', $url);
52 52
 }
53 53
 
54 54
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	if (preg_match(';^((?:[a-z]{3,33}:)?//.*?)(/.*)?$;iS', $lien, $r)) {
79 79
 		$r = array_pad($r, 3, '');
80 80
 
81
-		return $r[1] . resolve_path($r[2]);
81
+		return $r[1].resolve_path($r[2]);
82 82
 	}
83 83
 
84 84
 	# L'url site spip est un lien absolu aussi
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 	}
100 100
 	switch (substr($lien, 0, 1)) {
101 101
 		case '/':
102
-			return $debut . resolve_path($lien);
102
+			return $debut.resolve_path($lien);
103 103
 		case '#':
104
-			return $debut . resolve_path($dir . $mot . $get . $lien);
104
+			return $debut.resolve_path($dir.$mot.$get.$lien);
105 105
 		case '':
106
-			return $debut . resolve_path($dir . $mot . $get . $hash);
106
+			return $debut.resolve_path($dir.$mot.$get.$hash);
107 107
 		default:
108
-			return $debut . resolve_path($dir . $lien);
108
+			return $debut.resolve_path($dir.$lien);
109 109
 	}
110 110
 }
111 111
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		return '';
134 134
 	}
135 135
 	if (!$base) {
136
-		$base = url_de_base() . (_DIR_RACINE ? _DIR_RESTREINT_ABS : '');
136
+		$base = url_de_base().(_DIR_RACINE ? _DIR_RESTREINT_ABS : '');
137 137
 	}
138 138
 
139 139
 	return suivre_lien($base, $url);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
  * @param array $protocoles_autorises
157 157
  * @return bool
158 158
  */
159
-function protocole_verifier($url_absolue, $protocoles_autorises = ['http','https']) {
159
+function protocole_verifier($url_absolue, $protocoles_autorises = ['http', 'https']) {
160 160
 
161 161
 	if (preg_match(';^([a-z]{3,7})://;i', $url_absolue, $m)) {
162 162
 		$protocole = $m[1];
Please login to merge, or discard this patch.
ecrire/public/references.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	$select = true
125 125
 ) {
126 126
 	if (!is_string($defaut)) {
127
-		$defaut = '($Pile[0][\'' . strtolower($nom_champ) . '\'] ?? null)';
127
+		$defaut = '($Pile[0][\''.strtolower($nom_champ).'\'] ?? null)';
128 128
 	}
129 129
 
130 130
 	$idb_origine = $idb;
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			}
158 158
 			// renseigner la boucle source de ce champ pour les traitements
159 159
 			$boucles[$idb_origine]->index_champ[$nom_champ_origine] = $idb;
160
-			$champ = '$Pile[$SP' . ($i ? "-$i" : '') . '][\'' . $c . '\']';
160
+			$champ = '$Pile[$SP'.($i ? "-$i" : '').'][\''.$c.'\']';
161 161
 			if (!$joker) {
162 162
 				return index_compose($conditionnel, $champ);
163 163
 			}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 function index_compose($conditionnel, $defaut) {
199 199
 	while ($c = array_pop($conditionnel)) {
200 200
 		// si on passe defaut = '', ne pas générer d'erreur de compilation.
201
-		$defaut = "($c:(" . ($defaut ?: "''") . '))';
201
+		$defaut = "($c:(".($defaut ?: "''").'))';
202 202
 	}
203 203
 
204 204
 	return $defaut;
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	if (!$r) {
246 246
 		$joker = false; // indiquer a l'appelant
247 247
 		# continuer pour chercher l'erreur suivante
248
-		return ["'#" . $r . ':' . $nom_champ . "'", ''];
248
+		return ["'#".$r.':'.$nom_champ."'", ''];
249 249
 	}
250 250
 
251 251
 	$desc = $boucles[$idb]->show;
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	if (preg_match('/^(.*)\.(.*)$/', $nom_champ, $r)) {
288 288
 		[, $_table, $_nom_champ] = $r;
289 289
 		if ($cle = trouver_jointure_champ($_nom_champ, $boucles[$idb], [$_table])) {
290
-			$_alias = $cle . '_' . $_nom_champ;
290
+			$_alias = $cle.'_'.$_nom_champ;
291 291
 			return index_exception(
292 292
 				$boucles[$idb],
293 293
 				$desc,
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
 			$t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep);
368 368
 		}
369 369
 		if ($t == null) {
370
-			[$e, $x] = $excep;  #PHP4 affecte de gauche a droite
371
-			$excep = $x;    #PHP5 de droite a gauche !
370
+			[$e, $x] = $excep; #PHP4 affecte de gauche a droite
371
+			$excep = $x; #PHP5 de droite a gauche !
372 372
 			$j = $trouver_table($e, $boucle->sql_serveur);
373 373
 			if (!$j) {
374 374
 				return ['', ''];
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 					$l = (preg_split('/\s*,\s*/', $k));
381 381
 					$k = $desc['key']['PRIMARY KEY'];
382 382
 					if (!in_array($k, $l)) {
383
-						spip_log("jointure impossible $e " . join(',', $l));
383
+						spip_log("jointure impossible $e ".join(',', $l));
384 384
 
385 385
 						return ['', ''];
386 386
 					}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	// demander a SQL de gerer le synonyme
397 397
 	// ca permet que excep soit dynamique (Cedric, 2/3/06)
398 398
 	if ($excep != $nom_champ) {
399
-		$excep .= ' AS ' . $nom_champ;
399
+		$excep .= ' AS '.$nom_champ;
400 400
 	}
401 401
 
402 402
 	return ["$t.$excep", $nom_champ];
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 		join(',', $collecte),
631 631
 		($collecte ? $param : substr($param, 1)), # virer la virgule
632 632
 		memoriser_contexte_compil($p),
633
-		(!$supp ? '' : (', ' . join(',', $supp)))
633
+		(!$supp ? '' : (', '.join(',', $supp)))
634 634
 	);
635 635
 
636 636
 	$p->interdire_scripts = false;
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 	$nom = $p->id_boucle;
733 733
 
734 734
 	if ($nom and trouver_nom_serveur_distant($p)) {
735
-		spip_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit'));
735
+		spip_log($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit'));
736 736
 
737 737
 		return false;
738 738
 	}
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 			(strpos($ps, 'typo') !== false)
818 818
 		)
819 819
 	) {
820
-		$ps = 'traiter_doublons_documents($doublons, ' . $ps . ')';
820
+		$ps = 'traiter_doublons_documents($doublons, '.$ps.')';
821 821
 	}
822 822
 
823 823
 	// La protection des champs par |safehtml est assuree par les extensions
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 function compose_filtres_args($p, $args, $sep) {
936 936
 	$arglist = '';
937 937
 	foreach ($args as $arg) {
938
-		$arglist .= $sep .
938
+		$arglist .= $sep.
939 939
 			calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle);
940 940
 	}
941 941
 
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
 	while ($b != '') {
986 986
 		foreach ($p->boucles[$b]->criteres as $critere) {
987 987
 			if ($critere->op == $motif) {
988
-				$p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") .
988
+				$p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n").
989 989
 					"]['$champ']";
990 990
 				$b = '';
991 991
 				break 2;
@@ -1013,6 +1013,6 @@  discard block
 block discarded – undo
1013 1013
  */
1014 1014
 function zbug_presenter_champ($p, $champ = '') {
1015 1015
 	$balise = $champ ?: $p->nom_champ;
1016
-	$explicite = $p->nom_boucle ? $p->nom_boucle . ':' : '';
1016
+	$explicite = $p->nom_boucle ? $p->nom_boucle.':' : '';
1017 1017
 	return "#{$explicite}{$balise}";
1018 1018
 }
Please login to merge, or discard this patch.
ecrire/public/balises.php 1 patch
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
  */
359 359
 function balise_DOSSIER_SQUELETTE_dist($p) {
360 360
 	$code = substr(addslashes(dirname($p->descr['sourcefile'])), strlen(_DIR_RACINE));
361
-	$p->code = "_DIR_RACINE . '$code'" .
361
+	$p->code = "_DIR_RACINE . '$code'".
362 362
 		$p->interdire_scripts = false;
363 363
 
364 364
 	return $p;
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
  */
378 378
 function balise_SQUELETTE_dist($p) {
379 379
 	$code = addslashes($p->descr['sourcefile']);
380
-	$p->code = "'$code'" .
380
+	$p->code = "'$code'".
381 381
 		$p->interdire_scripts = false;
382 382
 
383 383
 	return $p;
@@ -429,9 +429,9 @@  discard block
 block discarded – undo
429 429
  **/
430 430
 function balise_NOM_SITE_dist($p) {
431 431
 	if (!$p->etoile) {
432
-		$p->code = 'supprimer_numero(calculer_url(' .
433
-			champ_sql('url_site', $p) . ',' .
434
-			champ_sql('nom_site', $p) .
432
+		$p->code = 'supprimer_numero(calculer_url('.
433
+			champ_sql('url_site', $p).','.
434
+			champ_sql('nom_site', $p).
435 435
 			", 'titre', \$connect, false))";
436 436
 	} else {
437 437
 		$p->code = champ_sql('nom_site', $p);
@@ -582,8 +582,8 @@  discard block
 block discarded – undo
582 582
  *     Pile complétée par le code à générer
583 583
  **/
584 584
 function balise_POPULARITE_ABSOLUE_dist($p) {
585
-	$p->code = 'ceil(' .
586
-		champ_sql('popularite', $p) .
585
+	$p->code = 'ceil('.
586
+		champ_sql('popularite', $p).
587 587
 		')';
588 588
 	$p->interdire_scripts = false;
589 589
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 	$p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b);
665 665
 ;
666 666
 	if (($v = interprete_argument_balise(1, $p)) !== null) {
667
-		$p->code = 'table_valeur(' . $p->code . ', ' . $v . ')';
667
+		$p->code = 'table_valeur('.$p->code.', '.$v.')';
668 668
 	}
669 669
 	$p->interdire_scripts = true;
670 670
 
@@ -804,16 +804,16 @@  discard block
 block discarded – undo
804 804
 	$trouver_table = charger_fonction('trouver_table', 'base');
805 805
 	if ($desc = $trouver_table(table_objet_sql($type_objet))) {
806 806
 		if (isset($desc['field']['descriptif'])) {
807
-			$_ligne .= "'descriptif' => " . champ_sql('descriptif', $p) . ',';
807
+			$_ligne .= "'descriptif' => ".champ_sql('descriptif', $p).',';
808 808
 		}
809 809
 		if (isset($desc['field']['texte'])) {
810
-			$_ligne .= "'texte' => " . champ_sql('texte', $p) . ',';
810
+			$_ligne .= "'texte' => ".champ_sql('texte', $p).',';
811 811
 		}
812 812
 		if (isset($desc['field']['chapo'])) {
813
-			$_ligne .= "'chapo' => " . champ_sql('chapo', $p) . ',';
813
+			$_ligne .= "'chapo' => ".champ_sql('chapo', $p).',';
814 814
 		}
815 815
 		if (isset($desc['introduction_longueur'])) {
816
-			$_introduction_longueur = "'" . $desc['introduction_longueur'] . "'";
816
+			$_introduction_longueur = "'".$desc['introduction_longueur']."'";
817 817
 		}
818 818
 	}
819 819
 	$_ligne .= ')';
@@ -909,10 +909,10 @@  discard block
 block discarded – undo
909 909
 		$p->code = sprintf(
910 910
 			CODE_RECUPERER_FOND,
911 911
 			"'modeles/lesauteurs'",
912
-			"array('objet'=>'" . $objet .
913
-			"','id_objet' => " . champ_sql($id_table_objet, $p) .
914
-			",'$id_table_objet' => " . champ_sql($id_table_objet, $p) .
915
-			($objet == 'article' ? '' : ",'id_article' => " . champ_sql('id_article', $p)) .
912
+			"array('objet'=>'".$objet.
913
+			"','id_objet' => ".champ_sql($id_table_objet, $p).
914
+			",'$id_table_objet' => ".champ_sql($id_table_objet, $p).
915
+			($objet == 'article' ? '' : ",'id_article' => ".champ_sql('id_article', $p)).
916 916
 			')',
917 917
 			"'trim'=>true, 'compil'=>array($c)",
918 918
 			_q($connect)
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
 					$m = trim($m);
982 982
 					if ($m != "''") {
983 983
 						if (!preg_match(',\W,', $m)) {
984
-							$m = $boucle->id_table . ".$m";
984
+							$m = $boucle->id_table.".$m";
985 985
 						}
986 986
 
987 987
 						$m .= ' AS titre_rang';
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
 	$f_pagination = chercher_filtre('pagination');
1143 1143
 	$type = $p->boucles[$b]->modificateur['debut_nom'];
1144 1144
 	$modif = ($type[0] !== "'") ? "'debut'.$type"
1145
-		: ("'debut" . substr($type, 1));
1145
+		: ("'debut".substr($type, 1));
1146 1146
 
1147 1147
 	$p->code = sprintf(
1148 1148
 		CODE_PAGINATION,
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN']];
1286 1286
 		erreur_squelette($msg, $p);
1287 1287
 	} else {
1288
-		$p->code = 'find_in_path((string)' . $arg . ')';
1288
+		$p->code = 'find_in_path((string)'.$arg.')';
1289 1289
 	}
1290 1290
 
1291 1291
 	$p->interdire_scripts = false;
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' CHEMIN_IMAGE']];
1321 1321
 		erreur_squelette($msg, $p);
1322 1322
 	} else {
1323
-		$p->code = 'chemin_image((string)' . $arg . ')';
1323
+		$p->code = 'chemin_image((string)'.$arg.')';
1324 1324
 	}
1325 1325
 
1326 1326
 	$p->interdire_scripts = false;
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
 		// cas de #ENV sans argument : on retourne le serialize() du tableau
1375 1375
 		// une belle fonction [(#ENV|affiche_env)] serait pratique
1376 1376
 		if ($src) {
1377
-			$p->code = '(is_array($a = (' . $src . ')) ? serialize($a) : "")';
1377
+			$p->code = '(is_array($a = ('.$src.')) ? serialize($a) : "")';
1378 1378
 		} else {
1379 1379
 			$p->code = 'serialize($Pile[0]??[])';
1380 1380
 		}
@@ -1427,8 +1427,8 @@  discard block
 block discarded – undo
1427 1427
 	$_sinon = interprete_argument_balise(2, $p);
1428 1428
 	$_unserialize = sinon(interprete_argument_balise(3, $p), 'false');
1429 1429
 
1430
-	$p->code = '(include_spip(\'inc/config\')?lire_config(' . $arg . ',' .
1431
-		($_sinon && $_sinon != "''" ? $_sinon : 'null') . ',' . $_unserialize . "):'')";
1430
+	$p->code = '(include_spip(\'inc/config\')?lire_config('.$arg.','.
1431
+		($_sinon && $_sinon != "''" ? $_sinon : 'null').','.$_unserialize."):'')";
1432 1432
 
1433 1433
 	return $p;
1434 1434
 }
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
 		$err_b_s_a = ['zbug_balise_sans_argument', ['balise' => 'SESSION_SET']];
1522 1522
 		erreur_squelette($err_b_s_a, $p);
1523 1523
 	} else {
1524
-		$p->code = '(include_spip("inc/session") AND session_set(' . $_nom . ',' . $_val . '))';
1524
+		$p->code = '(include_spip("inc/session") AND session_set('.$_nom.','.$_val.'))';
1525 1525
 	}
1526 1526
 
1527 1527
 	$p->interdire_scripts = false;
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
 			)
1570 1570
 		) {
1571 1571
 			$p->code = /* $r[1]. */
1572
-				'(' . $r[2] . ')';
1572
+				'('.$r[2].')';
1573 1573
 		} else {
1574 1574
 			$p->code = "eval('return '.$php.';')";
1575 1575
 		}
@@ -1813,9 +1813,9 @@  discard block
 block discarded – undo
1813 1813
 
1814 1814
 		// noter la duree du cache dans un entete proprietaire
1815 1815
 
1816
-		$code = "'<'.'" . '?php header("X-Spip-Cache: '
1816
+		$code = "'<'.'".'?php header("X-Spip-Cache: '
1817 1817
 			. $duree
1818
-			. '"); ?' . "'.'>'";
1818
+			. '"); ?'."'.'>'";
1819 1819
 
1820 1820
 		// Remplir le header Cache-Control
1821 1821
 		// cas #CACHE{0}
@@ -1836,9 +1836,9 @@  discard block
 block discarded – undo
1836 1836
 				$pa == 'cache-client'
1837 1837
 				and $duree > 0
1838 1838
 			) {
1839
-				$code .= ".'<'.'" . '?php header("Cache-Control: max-age='
1839
+				$code .= ".'<'.'".'?php header("Cache-Control: max-age='
1840 1840
 					. $duree
1841
-					. '"); ?' . "'.'>'";
1841
+					. '"); ?'."'.'>'";
1842 1842
 				// il semble logique, si on cache-client, de ne pas invalider
1843 1843
 				$pa = 'statique';
1844 1844
 			}
@@ -1847,7 +1847,7 @@  discard block
 block discarded – undo
1847 1847
 				$pa == 'statique'
1848 1848
 				and $duree > 0
1849 1849
 			) {
1850
-				$code .= ".'<'.'" . '?php header("X-Spip-Statique: oui"); ?' . "'.'>'";
1850
+				$code .= ".'<'.'".'?php header("X-Spip-Statique: oui"); ?'."'.'>'";
1851 1851
 			}
1852 1852
 		}
1853 1853
 	} else {
@@ -2011,9 +2011,9 @@  discard block
 block discarded – undo
2011 2011
 		if ($p->etoile) {
2012 2012
 			$_options[] = "'etoile'=>true";
2013 2013
 		}
2014
-		$_options[] = "'compil'=>array(" . memoriser_contexte_compil($p) . ')';
2014
+		$_options[] = "'compil'=>array(".memoriser_contexte_compil($p).')';
2015 2015
 
2016
-		$_l = 'array(' . join(",\n\t", $_contexte) . ')';
2016
+		$_l = 'array('.join(",\n\t", $_contexte).')';
2017 2017
 		if ($flag_env) {
2018 2018
 			$_l = "array_merge(\$Pile[0],$_l)";
2019 2019
 		}
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
 		$msg = ['zbug_balise_sans_argument', ['balise' => ' INCLURE']];
2024 2024
 		erreur_squelette($msg, $p);
2025 2025
 	} else {
2026
-		$p->code = 'charge_scripts(' . $_contexte[1] . ',false)';
2026
+		$p->code = 'charge_scripts('.$_contexte[1].',false)';
2027 2027
 	}
2028 2028
 
2029 2029
 	$p->interdire_scripts = false; // la securite est assuree par recuperer_fond
@@ -2071,7 +2071,7 @@  discard block
 block discarded – undo
2071 2071
 		unset($_contexte[1]);
2072 2072
 
2073 2073
 		if (preg_match("/^\s*'[^']*'/s", $nom)) {
2074
-			$nom = "'modeles/" . substr($nom, 1);
2074
+			$nom = "'modeles/".substr($nom, 1);
2075 2075
 		} else {
2076 2076
 			$nom = "'modeles/' . $nom";
2077 2077
 		}
@@ -2088,8 +2088,8 @@  discard block
 block discarded – undo
2088 2088
 			$primary = $p->boucles[$p->id_boucle]->primary;
2089 2089
 			if (!strpos($primary, ',')) {
2090 2090
 				$id = champ_sql($primary, $p);
2091
-				$_contexte[] = "'$primary'=>" . $id;
2092
-				$_contexte[] = "'id'=>" . $id;
2091
+				$_contexte[] = "'$primary'=>".$id;
2092
+				$_contexte[] = "'id'=>".$id;
2093 2093
 			}
2094 2094
 		}
2095 2095
 		$_contexte[] = "'recurs'=>(++\$recurs)";
@@ -2101,11 +2101,11 @@  discard block
 block discarded – undo
2101 2101
 		$_options = memoriser_contexte_compil($p);
2102 2102
 		$_options = "'compil'=>array($_options), 'trim'=>true";
2103 2103
 		if (isset($_contexte['ajax'])) {
2104
-			$_options .= ', ' . preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']);
2104
+			$_options .= ', '.preg_replace(',=>(.*)$,ims', '=> ($v=(\\1))?$v:true', $_contexte['ajax']);
2105 2105
 			unset($_contexte['ajax']);
2106 2106
 		}
2107 2107
 
2108
-		$_l = 'array(' . join(",\n\t", $_contexte) . ')';
2108
+		$_l = 'array('.join(",\n\t", $_contexte).')';
2109 2109
 		if ($flag_env) {
2110 2110
 			$_l = "array_merge(\$Pile[0],$_l)";
2111 2111
 		}
@@ -2215,12 +2215,12 @@  discard block
 block discarded – undo
2215 2215
 function balise_DOUBLONS_dist($p) {
2216 2216
 	if ($type = interprete_argument_balise(1, $p)) {
2217 2217
 		if ($famille = interprete_argument_balise(2, $p)) {
2218
-			$type .= '.' . $famille;
2218
+			$type .= '.'.$famille;
2219 2219
 		}
2220
-		$p->code = '(isset($doublons[' . $type . ']) ? $doublons[' . $type . '] : "")';
2220
+		$p->code = '(isset($doublons['.$type.']) ? $doublons['.$type.'] : "")';
2221 2221
 		if (!$p->etoile) {
2222 2222
 			$p->code = 'array_filter(array_map("intval",explode(",",'
2223
-				. $p->code . ')))';
2223
+				. $p->code.')))';
2224 2224
 		}
2225 2225
 	} else {
2226 2226
 		$p->code = '$doublons';
@@ -2349,7 +2349,7 @@  discard block
 block discarded – undo
2349 2349
 			$_code[] = "$_key => $_val";
2350 2350
 		}
2351 2351
 	} while ($_key && $_val);
2352
-	$p->code = 'array(' . join(', ', $_code) . ')';
2352
+	$p->code = 'array('.join(', ', $_code).')';
2353 2353
 	$p->interdire_scripts = false;
2354 2354
 
2355 2355
 	return $p;
@@ -2376,7 +2376,7 @@  discard block
 block discarded – undo
2376 2376
 	while ($_val = interprete_argument_balise($n++, $p)) {
2377 2377
 		$_code[] = $_val;
2378 2378
 	}
2379
-	$p->code = 'array(' . join(', ', $_code) . ')';
2379
+	$p->code = 'array('.join(', ', $_code).')';
2380 2380
 	$p->interdire_scripts = false;
2381 2381
 
2382 2382
 	return $p;
@@ -2421,10 +2421,10 @@  discard block
 block discarded – undo
2421 2421
 		$_code[] = $_v;
2422 2422
 	}
2423 2423
 
2424
-	$p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser(' . join(
2424
+	$p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('.join(
2425 2425
 		', ',
2426 2426
 		$_code
2427
-	) . ')?" ":"")';
2427
+	).')?" ":"")';
2428 2428
 	$p->interdire_scripts = false;
2429 2429
 
2430 2430
 	return $p;
@@ -2457,7 +2457,7 @@  discard block
 block discarded – undo
2457 2457
 	$type_info = isset($type_info) ? str_replace('\'', '"', $type_info) : '"est_actif"';
2458 2458
 
2459 2459
 	$f = chercher_filtre('info_plugin');
2460
-	$p->code = $f . '(' . $plugin . ', ' . $type_info . ')';
2460
+	$p->code = $f.'('.$plugin.', '.$type_info.')';
2461 2461
 
2462 2462
 	return $p;
2463 2463
 }
@@ -2689,7 +2689,7 @@  discard block
 block discarded – undo
2689 2689
 	}
2690 2690
 
2691 2691
 	// Différentes infos relatives au tri présentes dans les modificateurs
2692
-	$_tri_nom = $boucle->modificateur['tri_nom'] ; // nom du paramètre définissant le tri
2692
+	$_tri_nom = $boucle->modificateur['tri_nom']; // nom du paramètre définissant le tri
2693 2693
 	$_tri_champ = $boucle->modificateur['tri_champ']; // champ actuel utilisé le tri
2694 2694
 	$_tri_sens = $boucle->modificateur['tri_sens']; // sens de tri actuel
2695 2695
 	$_tri_liste_sens_defaut = $boucle->modificateur['tri_liste_sens_defaut']; // sens par défaut pour chaque champ
@@ -2784,7 +2784,7 @@  discard block
 block discarded – undo
2784 2784
 		$connect = $p->boucles[$p->id_boucle]->sql_serveur;
2785 2785
 	}
2786 2786
 
2787
-	$p->code = '(objet_test_si_publie(' . $_type . ',intval(' . $_id . '),' . _q($connect) . ")?' ':'')";
2787
+	$p->code = '(objet_test_si_publie('.$_type.',intval('.$_id.'),'._q($connect).")?' ':'')";
2788 2788
 	$p->interdire_scripts = false;
2789 2789
 
2790 2790
 	return $p;
Please login to merge, or discard this patch.