Completed
Push — master ( 197d33...1e6dd3 )
by cam
01:14
created
ecrire/action/inscrire_auteur.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	}
62 62
 
63 63
 	include_spip('base/abstract_sql');
64
-	$res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email=' . sql_quote($desc['email']));
64
+	$res = sql_select('statut, id_auteur, login, email, nom', 'spip_auteurs', 'email='.sql_quote($desc['email']));
65 65
 	// erreur ?
66 66
 	if (!$res) {
67 67
 		return _T('titre_probleme_technique');
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
 
218 218
 	$login = $login_base;
219 219
 
220
-	for ($i = 1;; $i++) {
220
+	for ($i = 1; ; $i++) {
221 221
 		if (!sql_countsel('spip_auteurs', "login='$login'")) {
222 222
 			return $login;
223 223
 		}
224
-		$login = $login_base . $i;
224
+		$login = $login_base.$i;
225 225
 	}
226 226
 }
227 227
 
@@ -361,11 +361,11 @@  discard block
 block discarded – undo
361 361
 	do {
362 362
 		// Un morceau du jeton est lisible en bdd pour éviter de devoir déchiffrer
363 363
 		// tous les jetons connus pour vérifier le jeton d’un auteur.
364
-		$public = substr(creer_uniqid(), 0, 7) . '.';
365
-		$jeton = $public . creer_uniqid();
366
-		$jeton_chiffre_prefixe = $public . Chiffrement::chiffrer($jeton, SpipCles::secret_du_site());
367
-		sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton_chiffre_prefixe], 'id_auteur=' . intval($id_auteur));
368
-	} while (sql_countsel('spip_auteurs', 'cookie_oubli=' . sql_quote($jeton_chiffre_prefixe, '', 'string')) > 1);
364
+		$public = substr(creer_uniqid(), 0, 7).'.';
365
+		$jeton = $public.creer_uniqid();
366
+		$jeton_chiffre_prefixe = $public.Chiffrement::chiffrer($jeton, SpipCles::secret_du_site());
367
+		sql_updateq('spip_auteurs', ['cookie_oubli' => $jeton_chiffre_prefixe], 'id_auteur='.intval($id_auteur));
368
+	} while (sql_countsel('spip_auteurs', 'cookie_oubli='.sql_quote($jeton_chiffre_prefixe, '', 'string')) > 1);
369 369
 
370 370
 	return $jeton;
371 371
 }
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
  */
383 383
 function auteur_lire_jeton(int $id_auteur, bool $autoInit = false): ?string {
384 384
 	include_spip('base/abstract_sql');
385
-	$jeton_chiffre_prefixe = sql_getfetsel('cookie_oubli', 'spip_auteurs', 'id_auteur=' . $id_auteur);
385
+	$jeton_chiffre_prefixe = sql_getfetsel('cookie_oubli', 'spip_auteurs', 'id_auteur='.$id_auteur);
386 386
 	if ($jeton_chiffre_prefixe) {
387 387
 		include_spip('inc/chiffrer');
388 388
 		$jeton_chiffre = substr($jeton_chiffre_prefixe, 8);
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	$public = substr($jeton, 0, 8);
415 415
 
416 416
 	// Les auteurs qui ont un jetons ressemblant
417
-	$auteurs = sql_allfetsel('*', 'spip_auteurs', 'cookie_oubli LIKE ' . sql_quote($public . '%'));
417
+	$auteurs = sql_allfetsel('*', 'spip_auteurs', 'cookie_oubli LIKE '.sql_quote($public.'%'));
418 418
 	foreach ($auteurs as $auteur) {
419 419
 		$jeton_chiffre = substr($auteur['cookie_oubli'], 8);
420 420
 		$_jeton = Chiffrement::dechiffrer($jeton_chiffre, SpipCles::secret_du_site());
@@ -433,5 +433,5 @@  discard block
 block discarded – undo
433 433
  */
434 434
 function auteur_effacer_jeton($id_auteur) {
435 435
 	include_spip('base/abstract_sql');
436
-	return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur=' . intval($id_auteur));
436
+	return sql_updateq('spip_auteurs', ['cookie_oubli' => ''], 'id_auteur='.intval($id_auteur));
437 437
 }
Please login to merge, or discard this patch.
ecrire/inc/utils.php 1 patch
Spacing   +122 added lines, -123 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
 
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 		$a = './';
593 593
 	}
594 594
 
595
-	$regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,';
595
+	$regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,';
596 596
 	$ajouts = array_flip(explode('|', $c));
597 597
 	$u = is_array($v) ? $v : rawurlencode((string) $v);
598 598
 	$testv = (is_array($v) ? count($v) : strlen((string) $v));
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
 			// Ajout. Pour une variable, remplacer au meme endroit,
620 620
 			// pour un tableau ce sera fait dans la prochaine boucle
621 621
 			elseif (substr($r[1], -2) != '[]') {
622
-				$url[$n] = $r[1] . '=' . $u;
622
+				$url[$n] = $r[1].'='.$u;
623 623
 				unset($ajouts[$r[1]]);
624 624
 			}
625 625
 			// Pour les tableaux on laisse tomber les valeurs de
@@ -640,11 +640,11 @@  discard block
 block discarded – undo
640 640
 	} elseif ($testv) {
641 641
 		foreach ($ajouts as $k => $n) {
642 642
 			if (!is_array($v)) {
643
-				$url[] = $k . '=' . $u;
643
+				$url[] = $k.'='.$u;
644 644
 			} else {
645
-				$id = (substr($k, -2) == '[]') ? $k : ($k . '[]');
645
+				$id = (substr($k, -2) == '[]') ? $k : ($k.'[]');
646 646
 				foreach ($v as $w) {
647
-					$url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w));
647
+					$url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w));
648 648
 				}
649 649
 			}
650 650
 		}
@@ -655,10 +655,10 @@  discard block
 block discarded – undo
655 655
 
656 656
 	// recomposer l'adresse
657 657
 	if ($url) {
658
-		$a .= '?' . join($sep, $url);
658
+		$a .= '?'.join($sep, $url);
659 659
 	}
660 660
 
661
-	return $a . $ancre;
661
+	return $a.$ancre;
662 662
 }
663 663
 
664 664
 /**
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 			translitteration($ancre)
691 691
 		);
692 692
 	}
693
-	return $url . (strlen($ancre) ? '#' . $ancre : '');
693
+	return $url.(strlen($ancre) ? '#'.$ancre : '');
694 694
 }
695 695
 
696 696
 /**
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
  * @return bool
807 807
  */
808 808
 function test_plugin_actif($plugin) {
809
-	return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false;
809
+	return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false;
810 810
 }
811 811
 
812 812
 /**
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 					$value = interdire_scripts($value, -1);
939 939
 				}
940 940
 				if (!empty($options['class'])) {
941
-					$value = "<span class='" . $options['class'] . "'>$value</span>";
941
+					$value = "<span class='".$options['class']."'>$value</span>";
942 942
 				}
943 943
 				$text = str_replace("@$name@", $value, $text);
944 944
 				unset($args[$name]);
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 		// Si des variables n'ont pas ete inserees, le signaler
948 948
 		// (chaines de langues pas a jour)
949 949
 		if ($args) {
950
-			spip_log("$f:  variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG);
950
+			spip_log("$f:  variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG);
951 951
 		}
952 952
 	}
953 953
 
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
 function joli_repertoire($rep) {
972 972
 	$a = substr($rep, 0, 1);
973 973
 	if ($a <> '.' and $a <> '/') {
974
-		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep;
974
+		$rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep;
975 975
 	}
976 976
 	$rep = preg_replace(',(^\.\.\/),', '', $rep);
977 977
 
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 			$p -= ($x * 1000);
1026 1026
 		}
1027 1027
 
1028
-		return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1028
+		return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p);
1029 1029
 	}
1030 1030
 }
1031 1031
 
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
 	if ($taches and count($taches) and !spip_connect()) {
1093 1093
 		return false;
1094 1094
 	}
1095
-	spip_log('cron !', 'jq' . _LOG_DEBUG);
1095
+	spip_log('cron !', 'jq'._LOG_DEBUG);
1096 1096
 	if ($genie = charger_fonction('genie', 'inc', true)) {
1097 1097
 		return $genie($taches);
1098 1098
 	}
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
 
1197 1197
 	if ($queue_next_job_time == -1) {
1198 1198
 		if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) {
1199
-			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt');
1199
+			define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt');
1200 1200
 		}
1201 1201
 		// utiliser un cache memoire si dispo
1202 1202
 		if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) {
@@ -1265,8 +1265,8 @@  discard block
 block discarded – undo
1265 1265
 		$src = '';
1266 1266
 	}
1267 1267
 	if ($script) {
1268
-		$script = ("/*<![CDATA[*/\n" .
1269
-			preg_replace(',</([^>]*)>,', '<\/\1>', $script) .
1268
+		$script = ("/*<![CDATA[*/\n".
1269
+			preg_replace(',</([^>]*)>,', '<\/\1>', $script).
1270 1270
 			'/*]]>*/');
1271 1271
 	}
1272 1272
 	if ($noscript) {
@@ -1352,13 +1352,13 @@  discard block
 block discarded – undo
1352 1352
 	if ($path_base == null) {
1353 1353
 		// Chemin standard depuis l'espace public
1354 1354
 		$path = defined('_SPIP_PATH') ? _SPIP_PATH :
1355
-			_DIR_RACINE . ':' .
1356
-			_DIR_RACINE . 'squelettes-dist/:' .
1357
-			_DIR_RACINE . 'prive/:' .
1355
+			_DIR_RACINE.':'.
1356
+			_DIR_RACINE.'squelettes-dist/:'.
1357
+			_DIR_RACINE.'prive/:'.
1358 1358
 			_DIR_RESTREINT;
1359 1359
 		// Ajouter squelettes/
1360
-		if (@is_dir(_DIR_RACINE . 'squelettes')) {
1361
-			$path = _DIR_RACINE . 'squelettes/:' . $path;
1360
+		if (@is_dir(_DIR_RACINE.'squelettes')) {
1361
+			$path = _DIR_RACINE.'squelettes/:'.$path;
1362 1362
 		}
1363 1363
 		foreach (explode(':', $path) as $dir) {
1364 1364
 			if (strlen($dir) and substr($dir, -1) != '/') {
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
 		// Et le(s) dossier(s) des squelettes nommes
1371 1371
 		if (strlen($GLOBALS['dossier_squelettes'])) {
1372 1372
 			foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1373
-				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/');
1373
+				array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/');
1374 1374
 			}
1375 1375
 		}
1376 1376
 		$GLOBALS['path_sig'] = md5(serialize($path_full));
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
 
1382 1382
 	if (is_array($dir_path) or strlen($dir_path)) {
1383 1383
 		$tete = '';
1384
-		if (reset($path_base) == _DIR_RACINE . 'squelettes/') {
1384
+		if (reset($path_base) == _DIR_RACINE.'squelettes/') {
1385 1385
 			$tete = array_shift($path_base);
1386 1386
 		}
1387 1387
 		$dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path));
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
 	// Et le(s) dossier(s) des squelettes nommes
1403 1403
 	if (strlen($GLOBALS['dossier_squelettes'])) {
1404 1404
 		foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) {
1405
-			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/');
1405
+			array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/');
1406 1406
 		}
1407 1407
 	}
1408 1408
 
@@ -1473,14 +1473,14 @@  discard block
 block discarded – undo
1473 1473
 	// si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png
1474 1474
 	if (
1475 1475
 		preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m)
1476
-		and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg'
1476
+		and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg'
1477 1477
 		and $f = find_in_theme("$file_svg_generique")
1478 1478
 	) {
1479
-		if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) {
1479
+		if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) {
1480 1480
 			return $themefiles["$subdir$file"] = $fsize;
1481 1481
 		}
1482 1482
 		else {
1483
-			return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px';
1483
+			return $themefiles["$subdir$file"] = "$f?".$m[1].'px';
1484 1484
 		}
1485 1485
 	}
1486 1486
 
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
 			return $themefiles["$subdir$file"] = $f;
1491 1491
 		}
1492 1492
 	}
1493
-	spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme');
1493
+	spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme');
1494 1494
 
1495 1495
 	return $themefiles["$subdir$file"] = '';
1496 1496
 }
@@ -1598,8 +1598,8 @@  discard block
 block discarded – undo
1598 1598
 			return false;
1599 1599
 		}
1600 1600
 		if ($include and !isset($inc[$dirname][$file])) {
1601
-			include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1602
-			$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1601
+			include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
1602
+			$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1603 1603
 		}
1604 1604
 
1605 1605
 		return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file];
@@ -1612,14 +1612,14 @@  discard block
 block discarded – undo
1612 1612
 	}
1613 1613
 
1614 1614
 	foreach (creer_chemin() as $dir) {
1615
-		if (!isset($dirs[$a = $dir . $dirname])) {
1616
-			$dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a);
1615
+		if (!isset($dirs[$a = $dir.$dirname])) {
1616
+			$dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a);
1617 1617
 		}
1618 1618
 		if ($dirs[$a]) {
1619
-			if (file_exists(_ROOT_CWD . ($a .= $file))) {
1619
+			if (file_exists(_ROOT_CWD.($a .= $file))) {
1620 1620
 				if ($include and !isset($inc[$dirname][$file])) {
1621
-					include_once _ROOT_CWD . $a;
1622
-					$inc[$dirname][$file] = $inc[''][$dirname . $file] = true;
1621
+					include_once _ROOT_CWD.$a;
1622
+					$inc[$dirname][$file] = $inc[''][$dirname.$file] = true;
1623 1623
 				}
1624 1624
 				if (!defined('_SAUVER_CHEMIN')) {
1625 1625
 					// si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
 					define('_SAUVER_CHEMIN', true);
1630 1630
 				}
1631 1631
 
1632
-				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a;
1632
+				return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a;
1633 1633
 			}
1634 1634
 		}
1635 1635
 	}
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
 		define('_SAUVER_CHEMIN', true);
1656 1656
 	}
1657 1657
 
1658
-	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false;
1658
+	return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false;
1659 1659
 }
1660 1660
 
1661 1661
 function clear_path_cache() {
@@ -1725,12 +1725,12 @@  discard block
 block discarded – undo
1725 1725
 	// cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue
1726 1726
 	// on a pas encore inclus flock.php
1727 1727
 	if (!function_exists('preg_files')) {
1728
-		include_once _ROOT_RESTREINT . 'inc/flock.php';
1728
+		include_once _ROOT_RESTREINT.'inc/flock.php';
1729 1729
 	}
1730 1730
 
1731 1731
 	// Parcourir le chemin
1732 1732
 	foreach (creer_chemin() as $d) {
1733
-		$f = $d . $dir;
1733
+		$f = $d.$dir;
1734 1734
 		if (@is_dir($f)) {
1735 1735
 			$liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs);
1736 1736
 			foreach ($liste as $chemin) {
@@ -1780,9 +1780,9 @@  discard block
 block discarded – undo
1780 1780
 	if ($type === 'defaut') {
1781 1781
 		$objet = objet_type($quoi);
1782 1782
 		if (
1783
-			$f = charger_fonction('generer_' . $objet . '_url', 'urls', true)
1783
+			$f = charger_fonction('generer_'.$objet.'_url', 'urls', true)
1784 1784
 			// deprecated
1785
-			or $f = charger_fonction('generer_url_' . $objet, 'urls', true)
1785
+			or $f = charger_fonction('generer_url_'.$objet, 'urls', true)
1786 1786
 		) {
1787 1787
 			return $f;
1788 1788
 		}
@@ -1795,7 +1795,7 @@  discard block
 block discarded – undo
1795 1795
 	}
1796 1796
 
1797 1797
 	// inclure le module d'url
1798
-	include_spip('urls/' . $url_type);
1798
+	include_spip('urls/'.$url_type);
1799 1799
 
1800 1800
 	switch ($quoi) {
1801 1801
 		case 'page':
@@ -1951,8 +1951,8 @@  discard block
 block discarded – undo
1951 1951
 	include_spip('base/connect_sql');
1952 1952
 	$id_type = id_table_objet($entite, $public);
1953 1953
 
1954
-	return _DIR_RACINE . get_spip_script('./')
1955
-	. '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public"
1954
+	return _DIR_RACINE.get_spip_script('./')
1955
+	. '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public"
1956 1956
 	. (!$args ? '' : "&$args")
1957 1957
 	. (!$ancre ? '' : "#$ancre");
1958 1958
 }
@@ -2123,7 +2123,7 @@  discard block
 block discarded – undo
2123 2123
 				!empty($_SERVER['QUERY_STRING'])
2124 2124
 				and !strpos($_SERVER['REQUEST_URI'], '?')
2125 2125
 			) {
2126
-				$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2126
+				$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2127 2127
 			}
2128 2128
 		}
2129 2129
 	}
@@ -2158,9 +2158,9 @@  discard block
 block discarded – undo
2158 2158
 		array_shift($myself);
2159 2159
 		$myself = implode('/', $myself);
2160 2160
 	}
2161
-	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/';
2161
+	$url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/';
2162 2162
 
2163
-	$url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/');
2163
+	$url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/');
2164 2164
 
2165 2165
 	return $url;
2166 2166
 }
@@ -2199,16 +2199,16 @@  discard block
 block discarded – undo
2199 2199
 function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) {
2200 2200
 	$script ??= '';
2201 2201
 	if (!$rel) {
2202
-		$rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT;
2202
+		$rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT;
2203 2203
 	} else {
2204 2204
 		if (!is_string($rel)) {
2205
-			$rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT;
2205
+			$rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT;
2206 2206
 		}
2207 2207
 	}
2208 2208
 
2209 2209
 	[$script, $ancre] = array_pad(explode('#', $script), 2, null);
2210 2210
 	if ($script and ($script <> 'accueil' or $rel)) {
2211
-		$args = "?exec=$script" . (!$args ? '' : "&$args");
2211
+		$args = "?exec=$script".(!$args ? '' : "&$args");
2212 2212
 	} elseif ($args) {
2213 2213
 		$args = "?$args";
2214 2214
 	}
@@ -2216,7 +2216,7 @@  discard block
 block discarded – undo
2216 2216
 		$args .= "#$ancre";
2217 2217
 	}
2218 2218
 
2219
-	return $rel . ($no_entities ? $args : str_replace('&', '&amp;', $args));
2219
+	return $rel.($no_entities ? $args : str_replace('&', '&amp;', $args));
2220 2220
 }
2221 2221
 
2222 2222
 //
@@ -2298,10 +2298,10 @@  discard block
 block discarded – undo
2298 2298
 			$action = parametre_url($action, _SPIP_PAGE, $script, '&');
2299 2299
 		}
2300 2300
 		if ($args) {
2301
-			$action .= (strpos($action, '?') !== false ? '&' : '?') . $args;
2301
+			$action .= (strpos($action, '?') !== false ? '&' : '?').$args;
2302 2302
 		}
2303 2303
 		// ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide
2304
-		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action"));
2304
+		$url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action"));
2305 2305
 	}
2306 2306
 
2307 2307
 	if (!$no_entities) {
@@ -2313,7 +2313,7 @@  discard block
 block discarded – undo
2313 2313
 
2314 2314
 function generer_url_prive($script, $args = '', $no_entities = false) {
2315 2315
 
2316
-	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php');
2316
+	return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php');
2317 2317
 }
2318 2318
 
2319 2319
 // Pour les formulaires en methode POST,
@@ -2348,8 +2348,7 @@  discard block
 block discarded – undo
2348 2348
 	. "><div>\n"
2349 2349
 	. "<input type='hidden' name='exec' value='$script1' />"
2350 2350
 	. $corps
2351
-	. (!$submit ? '' :
2352
-		("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>'))
2351
+	. (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>'))
2353 2352
 	. "</div></form>\n";
2354 2353
 }
2355 2354
 
@@ -2374,14 +2373,14 @@  discard block
 block discarded – undo
2374 2373
 		? generer_url_ecrire(_request('exec'))
2375 2374
 		: generer_url_public();
2376 2375
 
2377
-	return "\n<form action='" .
2378
-	$h .
2379
-	"'" .
2380
-	$atts .
2381
-	">\n" .
2382
-	'<div>' .
2383
-	"\n<input type='hidden' name='action' value='$script' />" .
2384
-	$corps .
2376
+	return "\n<form action='".
2377
+	$h.
2378
+	"'".
2379
+	$atts.
2380
+	">\n".
2381
+	'<div>'.
2382
+	"\n<input type='hidden' name='action' value='$script' />".
2383
+	$corps.
2385 2384
 	'</div></form>';
2386 2385
 }
2387 2386
 
@@ -2409,7 +2408,7 @@  discard block
 block discarded – undo
2409 2408
 		: generer_url_public('', '', false, false);
2410 2409
 	$url = parametre_url($url, 'action', $script);
2411 2410
 	if ($args) {
2412
-		$url .= quote_amp('&' . $args);
2411
+		$url .= quote_amp('&'.$args);
2413 2412
 	}
2414 2413
 
2415 2414
 	if ($no_entities) {
@@ -2443,9 +2442,9 @@  discard block
 block discarded – undo
2443 2442
 	}
2444 2443
 	$url =
2445 2444
 		(($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './')
2446
-	. $script . '/'
2445
+	. $script.'/'
2447 2446
 	. ($path ? trim($path, '/') : '')
2448
-	. ($args ? '?' . quote_amp($args) : '');
2447
+	. ($args ? '?'.quote_amp($args) : '');
2449 2448
 
2450 2449
 	if ($no_entities) {
2451 2450
 		$url = str_replace('&amp;', '&', $url);
@@ -2494,17 +2493,17 @@  discard block
 block discarded – undo
2494 2493
 
2495 2494
 	// le nom du repertoire plugins/ activables/desactivables
2496 2495
 	if (!defined('_DIR_PLUGINS')) {
2497
-		define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/');
2496
+		define('_DIR_PLUGINS', _DIR_RACINE.'plugins/');
2498 2497
 	}
2499 2498
 
2500 2499
 	// le nom du repertoire des extensions/ permanentes du core, toujours actives
2501 2500
 	if (!defined('_DIR_PLUGINS_DIST')) {
2502
-		define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/');
2501
+		define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/');
2503 2502
 	}
2504 2503
 
2505 2504
 	// le nom du repertoire des librairies
2506 2505
 	if (!defined('_DIR_LIB')) {
2507
-		define('_DIR_LIB', _DIR_RACINE . 'lib/');
2506
+		define('_DIR_LIB', _DIR_RACINE.'lib/');
2508 2507
 	}
2509 2508
 
2510 2509
 	if (!defined('_DIR_IMG')) {
@@ -2514,29 +2513,29 @@  discard block
 block discarded – undo
2514 2513
 		define('_DIR_LOGOS', $pa);
2515 2514
 	}
2516 2515
 	if (!defined('_DIR_IMG_ICONES')) {
2517
-		define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/');
2516
+		define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/');
2518 2517
 	}
2519 2518
 
2520 2519
 	if (!defined('_DIR_DUMP')) {
2521
-		define('_DIR_DUMP', $ti . 'dump/');
2520
+		define('_DIR_DUMP', $ti.'dump/');
2522 2521
 	}
2523 2522
 	if (!defined('_DIR_SESSIONS')) {
2524
-		define('_DIR_SESSIONS', $ti . 'sessions/');
2523
+		define('_DIR_SESSIONS', $ti.'sessions/');
2525 2524
 	}
2526 2525
 	if (!defined('_DIR_TRANSFERT')) {
2527
-		define('_DIR_TRANSFERT', $ti . 'upload/');
2526
+		define('_DIR_TRANSFERT', $ti.'upload/');
2528 2527
 	}
2529 2528
 	if (!defined('_DIR_CACHE')) {
2530
-		define('_DIR_CACHE', $ti . 'cache/');
2529
+		define('_DIR_CACHE', $ti.'cache/');
2531 2530
 	}
2532 2531
 	if (!defined('_DIR_CACHE_XML')) {
2533
-		define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/');
2532
+		define('_DIR_CACHE_XML', _DIR_CACHE.'xml/');
2534 2533
 	}
2535 2534
 	if (!defined('_DIR_SKELS')) {
2536
-		define('_DIR_SKELS', _DIR_CACHE . 'skel/');
2535
+		define('_DIR_SKELS', _DIR_CACHE.'skel/');
2537 2536
 	}
2538 2537
 	if (!defined('_DIR_AIDE')) {
2539
-		define('_DIR_AIDE', _DIR_CACHE . 'aide/');
2538
+		define('_DIR_AIDE', _DIR_CACHE.'aide/');
2540 2539
 	}
2541 2540
 	if (!defined('_DIR_TMP')) {
2542 2541
 		define('_DIR_TMP', $ti);
@@ -2565,27 +2564,27 @@  discard block
 block discarded – undo
2565 2564
 	// Declaration des fichiers
2566 2565
 
2567 2566
 	if (!defined('_CACHE_PLUGINS_PATH')) {
2568
-		define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php');
2567
+		define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php');
2569 2568
 	}
2570 2569
 	if (!defined('_CACHE_PLUGINS_OPT')) {
2571
-		define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php');
2570
+		define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php');
2572 2571
 	}
2573 2572
 	if (!defined('_CACHE_PLUGINS_FCT')) {
2574
-		define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php');
2573
+		define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php');
2575 2574
 	}
2576 2575
 	if (!defined('_CACHE_PIPELINES')) {
2577
-		define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php');
2576
+		define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php');
2578 2577
 	}
2579 2578
 	if (!defined('_CACHE_CHEMIN')) {
2580
-		define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt');
2579
+		define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt');
2581 2580
 	}
2582 2581
 
2583 2582
 	# attention .php obligatoire pour ecrire_fichier_securise
2584 2583
 	if (!defined('_FILE_META')) {
2585
-		define('_FILE_META', $ti . 'meta_cache.php');
2584
+		define('_FILE_META', $ti.'meta_cache.php');
2586 2585
 	}
2587 2586
 	if (!defined('_DIR_LOG')) {
2588
-		define('_DIR_LOG', _DIR_TMP . 'log/');
2587
+		define('_DIR_LOG', _DIR_TMP.'log/');
2589 2588
 	}
2590 2589
 	if (!defined('_FILE_LOG')) {
2591 2590
 		define('_FILE_LOG', 'spip');
@@ -2602,8 +2601,8 @@  discard block
 block discarded – undo
2602 2601
 	if (!defined('_FILE_CONNECT')) {
2603 2602
 		define(
2604 2603
 			'_FILE_CONNECT',
2605
-			(@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f
2606
-			: (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f
2604
+			(@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f
2605
+			: (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f
2607 2606
 			: false))
2608 2607
 		);
2609 2608
 	}
@@ -2615,7 +2614,7 @@  discard block
 block discarded – undo
2615 2614
 	if (!defined('_FILE_CHMOD')) {
2616 2615
 		define(
2617 2616
 			'_FILE_CHMOD',
2618
-			(@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f
2617
+			(@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f
2619 2618
 			: false)
2620 2619
 		);
2621 2620
 	}
@@ -2628,10 +2627,10 @@  discard block
 block discarded – undo
2628 2627
 		define('_FILE_TMP_SUFFIX', '.tmp.php');
2629 2628
 	}
2630 2629
 	if (!defined('_FILE_CONNECT_TMP')) {
2631
-		define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX);
2630
+		define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX);
2632 2631
 	}
2633 2632
 	if (!defined('_FILE_CHMOD_TMP')) {
2634
-		define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX);
2633
+		define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX);
2635 2634
 	}
2636 2635
 
2637 2636
 	// Definition des droits d'acces en ecriture
@@ -2649,13 +2648,13 @@  discard block
 block discarded – undo
2649 2648
 		define('_DEFAULT_CHARSET', 'utf-8');
2650 2649
 	}
2651 2650
 	if (!defined('_ROOT_PLUGINS')) {
2652
-		define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/');
2651
+		define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/');
2653 2652
 	}
2654 2653
 	if (!defined('_ROOT_PLUGINS_DIST')) {
2655
-		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/');
2654
+		define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/');
2656 2655
 	}
2657 2656
 	if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) {
2658
-		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2657
+		define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL));
2659 2658
 	}
2660 2659
 
2661 2660
 	// La taille des Log
@@ -2692,7 +2691,7 @@  discard block
 block discarded – undo
2692 2691
 	// (non surchargeable en l'etat ; attention si on utilise include_spip()
2693 2692
 	// pour le rendre surchargeable, on va provoquer un reecriture
2694 2693
 	// systematique du noyau ou une baisse de perfs => a etudier)
2695
-	include_once _ROOT_RESTREINT . 'inc/flock.php';
2694
+	include_once _ROOT_RESTREINT.'inc/flock.php';
2696 2695
 
2697 2696
 	// charger tout de suite le path et son cache
2698 2697
 	load_path_cache();
@@ -2740,7 +2739,7 @@  discard block
 block discarded – undo
2740 2739
 			!empty($_SERVER['QUERY_STRING'])
2741 2740
 			and !strpos($_SERVER['REQUEST_URI'], '?')
2742 2741
 		) {
2743
-			$GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING'];
2742
+			$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
2744 2743
 		}
2745 2744
 	}
2746 2745
 
@@ -2776,7 +2775,7 @@  discard block
 block discarded – undo
2776 2775
 		) {
2777 2776
 			if (isset($GLOBALS['meta']['adresse_site'])) {
2778 2777
 				$uri_ref = parse_url($GLOBALS['meta']['adresse_site']);
2779
-				$uri_ref = ($uri_ref['path'] ?? '') . '/';
2778
+				$uri_ref = ($uri_ref['path'] ?? '').'/';
2780 2779
 			} else {
2781 2780
 				$uri_ref = '';
2782 2781
 			}
@@ -2870,7 +2869,7 @@  discard block
 block discarded – undo
2870 2869
 	}
2871 2870
 	if (!defined('_CACHE_RUBRIQUES')) {
2872 2871
 		/** Fichier cache pour le navigateur de rubrique du bandeau */
2873
-		define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt');
2872
+		define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt');
2874 2873
 	}
2875 2874
 	if (!defined('_CACHE_RUBRIQUES_MAX')) {
2876 2875
 		/** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */
@@ -3092,7 +3091,7 @@  discard block
 block discarded – undo
3092 3091
 					}
3093 3092
 					if (isset($GLOBALS['visiteur_session']['nom'])) {
3094 3093
 						spip_log($GLOBALS['visiteur_session']['nom']
3095
-							. ' ' . _VAR_MODE);
3094
+							. ' '._VAR_MODE);
3096 3095
 					}
3097 3096
 				} // pas autorise ?
3098 3097
 				else {
@@ -3107,7 +3106,7 @@  discard block
 block discarded – undo
3107 3106
 						if (strpos($self, 'page=login') === false) {
3108 3107
 							include_spip('inc/headers');
3109 3108
 							$redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&');
3110
-							redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true));
3109
+							redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true));
3111 3110
 						}
3112 3111
 					}
3113 3112
 					// sinon tant pis
@@ -3149,10 +3148,10 @@  discard block
 block discarded – undo
3149 3148
 	// mais on risque de perturber des plugins en initialisant trop tot
3150 3149
 	// certaines constantes
3151 3150
 	@spip_initialisation_core(
3152
-		(_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES),
3153
-		(_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES),
3154
-		(_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES),
3155
-		(_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES)
3151
+		(_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES),
3152
+		(_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES),
3153
+		(_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES),
3154
+		(_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES)
3156 3155
 	);
3157 3156
 
3158 3157
 	// Demarrer une session NON AUTHENTIFIEE si on donne son nom
@@ -3185,7 +3184,7 @@  discard block
 block discarded – undo
3185 3184
 	}
3186 3185
 
3187 3186
 	$h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']);
3188
-	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) {
3187
+	if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) {
3189 3188
 		$session = charger_fonction('session', 'inc');
3190 3189
 		if ($session()) {
3191 3190
 			return $GLOBALS['visiteur_session']['statut'];
@@ -3265,7 +3264,7 @@  discard block
 block discarded – undo
3265 3264
 			'definir_session',
3266 3265
 			$GLOBALS['visiteur_session']
3267 3266
 				? serialize($GLOBALS['visiteur_session'])
3268
-				. '_' . @$_COOKIE['spip_session']
3267
+				. '_'.@$_COOKIE['spip_session']
3269 3268
 				: ''
3270 3269
 		);
3271 3270
 		$session = $s ? substr(md5($s), 0, 8) : '';
@@ -3421,11 +3420,11 @@  discard block
 block discarded – undo
3421 3420
 	$GLOBALS['_INC_PUBLIC']++;
3422 3421
 
3423 3422
 	// fix #4235
3424
-	$cache_utilise_session_appelant	= ($GLOBALS['cache_utilise_session'] ?? null);
3423
+	$cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null);
3425 3424
 
3426 3425
 
3427 3426
 	foreach (is_array($fond) ? $fond : [$fond] as $f) {
3428
-		unset($GLOBALS['cache_utilise_session']);	// fix #4235
3427
+		unset($GLOBALS['cache_utilise_session']); // fix #4235
3429 3428
 
3430 3429
 		$page = evaluer_fond($f, $contexte, $connect);
3431 3430
 		if ($page === '') {
@@ -3510,7 +3509,7 @@  discard block
 block discarded – undo
3510 3509
  * @return array|string
3511 3510
  */
3512 3511
 function trouver_fond($nom, $dir = '', $pathinfo = false) {
3513
-	$f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : '');
3512
+	$f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : '');
3514 3513
 	if (!$pathinfo) {
3515 3514
 		return $f;
3516 3515
 	}
Please login to merge, or discard this patch.
ecrire/inc/presenter_enfants.php 1 patch
Spacing   +25 added lines, -26 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	$result = sql_select(
44 44
 		'id_rubrique, id_parent, titre, descriptif, lang',
45 45
 		'spip_rubriques',
46
-		'id_parent=' . intval($collection),
46
+		'id_parent='.intval($collection),
47 47
 		'',
48 48
 		'0+titre,titre',
49 49
 		$debut == -1 ? '' : "$debut,$limite"
@@ -74,19 +74,18 @@  discard block
 block discarded – undo
74 74
 				}
75 75
 			}
76 76
 
77
-			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' :
78
-					http_img_pack(
77
+			$lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack(
79 78
 						'auteur-0minirezo-16.png',
80 79
 						'',
81 80
 						" width='16' height='16'",
82 81
 						_T('image_administrer_rubrique')
83
-					)) .
84
-				" <a class='titremlien' dir='$lang_dir'" .
85
-				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') .
86
-				" href='" .
87
-				generer_objet_url($id_rubrique, 'rubrique') .
88
-				"'><span class='titre'>" .
89
-				$rang . $titre
82
+					)).
83
+				" <a class='titremlien' dir='$lang_dir'".
84
+				($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : '').
85
+				" href='".
86
+				generer_objet_url($id_rubrique, 'rubrique').
87
+				"'><span class='titre'>".
88
+				$rang.$titre
90 89
 				. '</span>'
91 90
 				. (is_string($logo) ? $logo : '')
92 91
 				. '</a>';
@@ -96,8 +95,8 @@  discard block
 block discarded – undo
96 95
 				;
97 96
 
98 97
 			$res[] =
99
-				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) .
100
-				$les_sous_enfants .
98
+				debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre).
99
+				$les_sous_enfants.
101 100
 				fin_cadre_sous_rub();
102 101
 		}
103 102
 	}
@@ -116,7 +115,7 @@  discard block
 block discarded – undo
116 115
  *  Le contenu du bloc dépliable
117 116
  */
118 117
 function sous_enfant_rub($collection2) {
119
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($collection2));
118
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($collection2));
120 119
 
121 120
 	$retour = '';
122 121
 	$pagination = '';
@@ -128,23 +127,23 @@  discard block
 block discarded – undo
128 127
 	 * Si > 500 on affiche une pagination
129 128
 	 */
130 129
 	if ($nb > $limite) {
131
-		$debut = _request('debut_rubrique' . $collection2) ?: $debut;
130
+		$debut = _request('debut_rubrique'.$collection2) ?: $debut;
132 131
 		$pagination = chercher_filtre('pagination');
133
-		$pagination = '<nav class="pagination">' . $pagination(
132
+		$pagination = '<nav class="pagination">'.$pagination(
134 133
 			$nb,
135
-			'_rubrique' . $collection2,
134
+			'_rubrique'.$collection2,
136 135
 			$debut,
137 136
 			$limite,
138 137
 			true,
139 138
 			'prive'
140
-		) . '</nav>';
139
+		).'</nav>';
141 140
 		$limite = $debut + $limite;
142 141
 	}
143 142
 
144 143
 	$result = sql_select(
145 144
 		'id_rubrique, id_parent, titre, lang',
146 145
 		'spip_rubriques',
147
-		'id_parent=' . intval($collection2),
146
+		'id_parent='.intval($collection2),
148 147
 		'',
149 148
 		'0+titre,titre',
150 149
 		$debut == -1 ? '' : "$debut,$limite"
@@ -164,14 +163,14 @@  discard block
 block discarded – undo
164 163
 		changer_typo($row['lang']);
165 164
 		$lang_dir = lang_dir($row['lang']);
166 165
 		if (autoriser('voir', 'rubrique', $id_rubrique2)) {
167
-			$retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_objet_url(
166
+			$retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_objet_url(
168 167
 				$id_rubrique2,
169 168
 				'rubrique'
170
-			) . "'>" . $rang2 . $titre2 . "</a></li>\n";
169
+			)."'>".$rang2.$titre2."</a></li>\n";
171 170
 		}
172 171
 	}
173 172
 
174
-	$retour = $pagination . $retour . $pagination;
173
+	$retour = $pagination.$retour.$pagination;
175 174
 
176 175
 	if (!$retour) {
177 176
 		return '';
@@ -180,7 +179,7 @@  discard block
 block discarded – undo
180 179
 	return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2")
181 180
 	. "\n<ul class='liste-items sous-sous-rub'>\n"
182 181
 	. $retour
183
-	. "</ul>\n" . fin_block() . "\n\n";
182
+	. "</ul>\n".fin_block()."\n\n";
184 183
 }
185 184
 
186 185
 /**
@@ -199,13 +198,13 @@  discard block
 block discarded – undo
199 198
 	$debut = 0;
200 199
 	$limite = 500;
201 200
 
202
-	$nb = sql_countsel('spip_rubriques', 'id_parent=' . intval($id_rubrique));
201
+	$nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique));
203 202
 
204 203
 	if ($nb > $limite) {
205
-		$debut = _request('debut_rubrique' . $id_rubrique) ?: $debut;
204
+		$debut = _request('debut_rubrique'.$id_rubrique) ?: $debut;
206 205
 		$pagination = chercher_filtre('pagination');
207
-		$pagination = '<br class="nettoyeur"><nav class="pagination">' .
208
-			$pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') .
206
+		$pagination = '<br class="nettoyeur"><nav class="pagination">'.
207
+			$pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive').
209 208
 		'</nav>';
210 209
 	}
211 210
 
Please login to merge, or discard this patch.