@@ -53,12 +53,12 @@ discard block |
||
| 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 |
||
| 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,14 +98,14 @@ discard block |
||
| 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 | - _T('fichier_introuvable', ['fichier' => '<b>' . spip_htmlentities($d) . '</b>']), |
|
| 108 | - ['all_inline' => true,'status' => 404] |
|
| 107 | + _T('fichier_introuvable', ['fichier' => '<b>'.spip_htmlentities($d).'</b>']), |
|
| 108 | + ['all_inline' => true, 'status' => 404] |
|
| 109 | 109 | ); |
| 110 | 110 | exit; |
| 111 | 111 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * - string : chemin du fichier trouvé |
| 152 | 152 | **/ |
| 153 | 153 | function include_spip($f, $include = true) { |
| 154 | - return find_in_path($f . '.php', '', $include); |
|
| 154 | + return find_in_path($f.'.php', '', $include); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | * - string : chemin du fichier trouvé |
| 172 | 172 | **/ |
| 173 | 173 | function require_spip($f) { |
| 174 | - return find_in_path($f . '.php', '', 'required'); |
|
| 174 | + return find_in_path($f.'.php', '', 'required'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // donc il faut l'inclure "en globals" |
| 189 | 189 | if ($f = find_in_path('mes_fonctions.php')) { |
| 190 | 190 | global $dossier_squelettes; |
| 191 | - include_once(_ROOT_CWD . $f); |
|
| 191 | + include_once(_ROOT_CWD.$f); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | if (@is_readable(_CACHE_PLUGINS_FCT)) { |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | // appliquer notre fonction si elle existe |
| 296 | - $fonc = 'execute_pipeline_' . strtolower($action); |
|
| 296 | + $fonc = 'execute_pipeline_'.strtolower($action); |
|
| 297 | 297 | if (function_exists($fonc)) { |
| 298 | 298 | $val = $fonc($val); |
| 299 | 299 | } // plantage ? |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | function spip_log($message = null, $name = null) { |
| 359 | 359 | static $pre = []; |
| 360 | 360 | static $log; |
| 361 | - preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs); |
|
| 361 | + preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs); |
|
| 362 | 362 | if (!isset($regs[1]) or !$logname = $regs[1]) { |
| 363 | 363 | $logname = null; |
| 364 | 364 | } |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | if (!is_string($message)) { |
| 387 | 387 | $message = print_r($message, true); |
| 388 | 388 | } |
| 389 | - $log($pre[$niveau] . ' ' . $message, $logname); |
|
| 389 | + $log($pre[$niveau].' '.$message, $logname); |
|
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | $a = './'; |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | - $regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,'; |
|
| 590 | + $regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,'; |
|
| 591 | 591 | $ajouts = array_flip(explode('|', $c)); |
| 592 | 592 | $u = is_array($v) ? $v : rawurlencode((string) $v); |
| 593 | 593 | $testv = (is_array($v) ? count($v) : strlen((string) $v)); |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | // Ajout. Pour une variable, remplacer au meme endroit, |
| 615 | 615 | // pour un tableau ce sera fait dans la prochaine boucle |
| 616 | 616 | elseif (substr($r[1], -2) != '[]') { |
| 617 | - $url[$n] = $r[1] . '=' . $u; |
|
| 617 | + $url[$n] = $r[1].'='.$u; |
|
| 618 | 618 | unset($ajouts[$r[1]]); |
| 619 | 619 | } |
| 620 | 620 | // Pour les tableaux on laisse tomber les valeurs de |
@@ -635,11 +635,11 @@ discard block |
||
| 635 | 635 | } elseif ($testv) { |
| 636 | 636 | foreach ($ajouts as $k => $n) { |
| 637 | 637 | if (!is_array($v)) { |
| 638 | - $url[] = $k . '=' . $u; |
|
| 638 | + $url[] = $k.'='.$u; |
|
| 639 | 639 | } else { |
| 640 | - $id = (substr($k, -2) == '[]') ? $k : ($k . '[]'); |
|
| 640 | + $id = (substr($k, -2) == '[]') ? $k : ($k.'[]'); |
|
| 641 | 641 | foreach ($v as $w) { |
| 642 | - $url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 642 | + $url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 643 | 643 | } |
| 644 | 644 | } |
| 645 | 645 | } |
@@ -650,10 +650,10 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | // recomposer l'adresse |
| 652 | 652 | if ($url) { |
| 653 | - $a .= '?' . join($sep, $url); |
|
| 653 | + $a .= '?'.join($sep, $url); |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | - return $a . $ancre; |
|
| 656 | + return $a.$ancre; |
|
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | /** |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | translitteration($ancre) |
| 686 | 686 | ); |
| 687 | 687 | } |
| 688 | - return $url . (strlen($ancre) ? '#' . $ancre : ''); |
|
| 688 | + return $url.(strlen($ancre) ? '#'.$ancre : ''); |
|
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | /** |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | * @return bool |
| 802 | 802 | */ |
| 803 | 803 | function test_plugin_actif($plugin) { |
| 804 | - return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false; |
|
| 804 | + return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false; |
|
| 805 | 805 | } |
| 806 | 806 | |
| 807 | 807 | /** |
@@ -933,7 +933,7 @@ discard block |
||
| 933 | 933 | $value = interdire_scripts($value, -1); |
| 934 | 934 | } |
| 935 | 935 | if (!empty($options['class'])) { |
| 936 | - $value = "<span class='" . $options['class'] . "'>$value</span>"; |
|
| 936 | + $value = "<span class='".$options['class']."'>$value</span>"; |
|
| 937 | 937 | } |
| 938 | 938 | $text = str_replace("@$name@", $value, $text); |
| 939 | 939 | unset($args[$name]); |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | // Si des variables n'ont pas ete inserees, le signaler |
| 943 | 943 | // (chaines de langues pas a jour) |
| 944 | 944 | if ($args) { |
| 945 | - spip_log("$f: variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 945 | + spip_log("$f: variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 946 | 946 | } |
| 947 | 947 | } |
| 948 | 948 | |
@@ -966,7 +966,7 @@ discard block |
||
| 966 | 966 | function joli_repertoire($rep) { |
| 967 | 967 | $a = substr($rep, 0, 1); |
| 968 | 968 | if ($a <> '.' and $a <> '/') { |
| 969 | - $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep; |
|
| 969 | + $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep; |
|
| 970 | 970 | } |
| 971 | 971 | $rep = preg_replace(',(^\.\.\/),', '', $rep); |
| 972 | 972 | |
@@ -1020,7 +1020,7 @@ discard block |
||
| 1020 | 1020 | $p -= ($x * 1000); |
| 1021 | 1021 | } |
| 1022 | 1022 | |
| 1023 | - return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1023 | + return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1024 | 1024 | } |
| 1025 | 1025 | } |
| 1026 | 1026 | |
@@ -1088,7 +1088,7 @@ discard block |
||
| 1088 | 1088 | if ($taches and count($taches) and !spip_connect()) { |
| 1089 | 1089 | return false; |
| 1090 | 1090 | } |
| 1091 | - spip_log('cron !', 'jq' . _LOG_DEBUG); |
|
| 1091 | + spip_log('cron !', 'jq'._LOG_DEBUG); |
|
| 1092 | 1092 | if ($genie = charger_fonction('genie', 'inc', true)) { |
| 1093 | 1093 | return $genie($taches); |
| 1094 | 1094 | } |
@@ -1192,7 +1192,7 @@ discard block |
||
| 1192 | 1192 | |
| 1193 | 1193 | if ($queue_next_job_time == -1) { |
| 1194 | 1194 | if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) { |
| 1195 | - define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt'); |
|
| 1195 | + define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt'); |
|
| 1196 | 1196 | } |
| 1197 | 1197 | // utiliser un cache memoire si dispo |
| 1198 | 1198 | if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) { |
@@ -1261,8 +1261,8 @@ discard block |
||
| 1261 | 1261 | $src = ''; |
| 1262 | 1262 | } |
| 1263 | 1263 | if ($script) { |
| 1264 | - $script = ("/*<![CDATA[*/\n" . |
|
| 1265 | - preg_replace(',</([^>]*)>,', '<\/\1>', $script) . |
|
| 1264 | + $script = ("/*<![CDATA[*/\n". |
|
| 1265 | + preg_replace(',</([^>]*)>,', '<\/\1>', $script). |
|
| 1266 | 1266 | '/*]]>*/'); |
| 1267 | 1267 | } |
| 1268 | 1268 | if ($noscript) { |
@@ -1348,13 +1348,13 @@ discard block |
||
| 1348 | 1348 | if ($path_base == null) { |
| 1349 | 1349 | // Chemin standard depuis l'espace public |
| 1350 | 1350 | $path = defined('_SPIP_PATH') ? _SPIP_PATH : |
| 1351 | - _DIR_RACINE . ':' . |
|
| 1352 | - _DIR_RACINE . 'squelettes-dist/:' . |
|
| 1353 | - _DIR_RACINE . 'prive/:' . |
|
| 1351 | + _DIR_RACINE.':'. |
|
| 1352 | + _DIR_RACINE.'squelettes-dist/:'. |
|
| 1353 | + _DIR_RACINE.'prive/:'. |
|
| 1354 | 1354 | _DIR_RESTREINT; |
| 1355 | 1355 | // Ajouter squelettes/ |
| 1356 | - if (@is_dir(_DIR_RACINE . 'squelettes')) { |
|
| 1357 | - $path = _DIR_RACINE . 'squelettes/:' . $path; |
|
| 1356 | + if (@is_dir(_DIR_RACINE.'squelettes')) { |
|
| 1357 | + $path = _DIR_RACINE.'squelettes/:'.$path; |
|
| 1358 | 1358 | } |
| 1359 | 1359 | foreach (explode(':', $path) as $dir) { |
| 1360 | 1360 | if (strlen($dir) and substr($dir, -1) != '/') { |
@@ -1366,7 +1366,7 @@ discard block |
||
| 1366 | 1366 | // Et le(s) dossier(s) des squelettes nommes |
| 1367 | 1367 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1368 | 1368 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1369 | - array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1369 | + array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/'); |
|
| 1370 | 1370 | } |
| 1371 | 1371 | } |
| 1372 | 1372 | $GLOBALS['path_sig'] = md5(serialize($path_full)); |
@@ -1377,7 +1377,7 @@ discard block |
||
| 1377 | 1377 | |
| 1378 | 1378 | if (is_array($dir_path) or strlen($dir_path)) { |
| 1379 | 1379 | $tete = ''; |
| 1380 | - if (reset($path_base) == _DIR_RACINE . 'squelettes/') { |
|
| 1380 | + if (reset($path_base) == _DIR_RACINE.'squelettes/') { |
|
| 1381 | 1381 | $tete = array_shift($path_base); |
| 1382 | 1382 | } |
| 1383 | 1383 | $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path)); |
@@ -1398,7 +1398,7 @@ discard block |
||
| 1398 | 1398 | // Et le(s) dossier(s) des squelettes nommes |
| 1399 | 1399 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1400 | 1400 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1401 | - array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1401 | + array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/'); |
|
| 1402 | 1402 | } |
| 1403 | 1403 | } |
| 1404 | 1404 | |
@@ -1469,14 +1469,14 @@ discard block |
||
| 1469 | 1469 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 1470 | 1470 | if ( |
| 1471 | 1471 | preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m) |
| 1472 | - and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg' |
|
| 1472 | + and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg' |
|
| 1473 | 1473 | and $f = find_in_theme("$file_svg_generique") |
| 1474 | 1474 | ) { |
| 1475 | - if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) { |
|
| 1475 | + if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) { |
|
| 1476 | 1476 | return $themefiles["$subdir$file"] = $fsize; |
| 1477 | 1477 | } |
| 1478 | 1478 | else { |
| 1479 | - return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px'; |
|
| 1479 | + return $themefiles["$subdir$file"] = "$f?".$m[1].'px'; |
|
| 1480 | 1480 | } |
| 1481 | 1481 | } |
| 1482 | 1482 | |
@@ -1486,7 +1486,7 @@ discard block |
||
| 1486 | 1486 | return $themefiles["$subdir$file"] = $f; |
| 1487 | 1487 | } |
| 1488 | 1488 | } |
| 1489 | - spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme'); |
|
| 1489 | + spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme'); |
|
| 1490 | 1490 | |
| 1491 | 1491 | return $themefiles["$subdir$file"] = ''; |
| 1492 | 1492 | } |
@@ -1594,8 +1594,8 @@ discard block |
||
| 1594 | 1594 | return false; |
| 1595 | 1595 | } |
| 1596 | 1596 | if ($include and !isset($inc[$dirname][$file])) { |
| 1597 | - include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1598 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1597 | + include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1598 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1599 | 1599 | } |
| 1600 | 1600 | |
| 1601 | 1601 | return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
@@ -1608,14 +1608,14 @@ discard block |
||
| 1608 | 1608 | } |
| 1609 | 1609 | |
| 1610 | 1610 | foreach (creer_chemin() as $dir) { |
| 1611 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 1612 | - $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a); |
|
| 1611 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 1612 | + $dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a); |
|
| 1613 | 1613 | } |
| 1614 | 1614 | if ($dirs[$a]) { |
| 1615 | - if (file_exists(_ROOT_CWD . ($a .= $file))) { |
|
| 1615 | + if (file_exists(_ROOT_CWD.($a .= $file))) { |
|
| 1616 | 1616 | if ($include and !isset($inc[$dirname][$file])) { |
| 1617 | - include_once _ROOT_CWD . $a; |
|
| 1618 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1617 | + include_once _ROOT_CWD.$a; |
|
| 1618 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1619 | 1619 | } |
| 1620 | 1620 | if (!defined('_SAUVER_CHEMIN')) { |
| 1621 | 1621 | // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher |
@@ -1625,7 +1625,7 @@ discard block |
||
| 1625 | 1625 | define('_SAUVER_CHEMIN', true); |
| 1626 | 1626 | } |
| 1627 | 1627 | |
| 1628 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a; |
|
| 1628 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a; |
|
| 1629 | 1629 | } |
| 1630 | 1630 | } |
| 1631 | 1631 | } |
@@ -1651,7 +1651,7 @@ discard block |
||
| 1651 | 1651 | define('_SAUVER_CHEMIN', true); |
| 1652 | 1652 | } |
| 1653 | 1653 | |
| 1654 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false; |
|
| 1654 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false; |
|
| 1655 | 1655 | } |
| 1656 | 1656 | |
| 1657 | 1657 | function clear_path_cache() { |
@@ -1721,12 +1721,12 @@ discard block |
||
| 1721 | 1721 | // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue |
| 1722 | 1722 | // on a pas encore inclus flock.php |
| 1723 | 1723 | if (!function_exists('preg_files')) { |
| 1724 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 1724 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 1725 | 1725 | } |
| 1726 | 1726 | |
| 1727 | 1727 | // Parcourir le chemin |
| 1728 | 1728 | foreach (creer_chemin() as $d) { |
| 1729 | - $f = $d . $dir; |
|
| 1729 | + $f = $d.$dir; |
|
| 1730 | 1730 | if (@is_dir($f)) { |
| 1731 | 1731 | $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs); |
| 1732 | 1732 | foreach ($liste as $chemin) { |
@@ -1834,7 +1834,7 @@ discard block |
||
| 1834 | 1834 | return $res; |
| 1835 | 1835 | } |
| 1836 | 1836 | // Sinon c'est un raccourci ou compat SPIP < 2 |
| 1837 | - if (!function_exists($f = 'generer_url_' . $entite)) { |
|
| 1837 | + if (!function_exists($f = 'generer_url_'.$entite)) { |
|
| 1838 | 1838 | if (!function_exists($f .= '_dist')) { |
| 1839 | 1839 | $f = ''; |
| 1840 | 1840 | } |
@@ -1843,8 +1843,8 @@ discard block |
||
| 1843 | 1843 | $url = $f($id, $args, $ancre); |
| 1844 | 1844 | if (strlen($args)) { |
| 1845 | 1845 | $url .= strstr($url, '?') |
| 1846 | - ? '&' . $args |
|
| 1847 | - : '?' . $args; |
|
| 1846 | + ? '&'.$args |
|
| 1847 | + : '?'.$args; |
|
| 1848 | 1848 | } |
| 1849 | 1849 | |
| 1850 | 1850 | return $url; |
@@ -1875,8 +1875,8 @@ discard block |
||
| 1875 | 1875 | include_spip('base/connect_sql'); |
| 1876 | 1876 | $id_type = id_table_objet($entite, $public); |
| 1877 | 1877 | |
| 1878 | - return _DIR_RACINE . get_spip_script('./') |
|
| 1879 | - . '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public" |
|
| 1878 | + return _DIR_RACINE.get_spip_script('./') |
|
| 1879 | + . '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public" |
|
| 1880 | 1880 | . (!$args ? '' : "&$args") |
| 1881 | 1881 | . (!$ancre ? '' : "#$ancre"); |
| 1882 | 1882 | } |
@@ -2030,7 +2030,7 @@ discard block |
||
| 2030 | 2030 | !empty($_SERVER['QUERY_STRING']) |
| 2031 | 2031 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2032 | 2032 | ) { |
| 2033 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2033 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2034 | 2034 | } |
| 2035 | 2035 | } |
| 2036 | 2036 | } |
@@ -2065,9 +2065,9 @@ discard block |
||
| 2065 | 2065 | array_shift($myself); |
| 2066 | 2066 | $myself = implode('/', $myself); |
| 2067 | 2067 | } |
| 2068 | - $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/'; |
|
| 2068 | + $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/'; |
|
| 2069 | 2069 | |
| 2070 | - $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/'); |
|
| 2070 | + $url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/'); |
|
| 2071 | 2071 | |
| 2072 | 2072 | return $url; |
| 2073 | 2073 | } |
@@ -2105,16 +2105,16 @@ discard block |
||
| 2105 | 2105 | **/ |
| 2106 | 2106 | function generer_url_ecrire($script = '', $args = '', $no_entities = false, $rel = false) { |
| 2107 | 2107 | if (!$rel) { |
| 2108 | - $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT; |
|
| 2108 | + $rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT; |
|
| 2109 | 2109 | } else { |
| 2110 | 2110 | if (!is_string($rel)) { |
| 2111 | - $rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT; |
|
| 2111 | + $rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT; |
|
| 2112 | 2112 | } |
| 2113 | 2113 | } |
| 2114 | 2114 | |
| 2115 | 2115 | [$script, $ancre] = array_pad(explode('#', $script), 2, null); |
| 2116 | 2116 | if ($script and ($script <> 'accueil' or $rel)) { |
| 2117 | - $args = "?exec=$script" . (!$args ? '' : "&$args"); |
|
| 2117 | + $args = "?exec=$script".(!$args ? '' : "&$args"); |
|
| 2118 | 2118 | } elseif ($args) { |
| 2119 | 2119 | $args = "?$args"; |
| 2120 | 2120 | } |
@@ -2122,7 +2122,7 @@ discard block |
||
| 2122 | 2122 | $args .= "#$ancre"; |
| 2123 | 2123 | } |
| 2124 | 2124 | |
| 2125 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2125 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2126 | 2126 | } |
| 2127 | 2127 | |
| 2128 | 2128 | // |
@@ -2195,25 +2195,25 @@ discard block |
||
| 2195 | 2195 | if (is_array($args)) { |
| 2196 | 2196 | $r = ''; |
| 2197 | 2197 | foreach ($args as $k => $v) { |
| 2198 | - $r .= '&' . $k . '=' . $v; |
|
| 2198 | + $r .= '&'.$k.'='.$v; |
|
| 2199 | 2199 | } |
| 2200 | 2200 | $args = substr($r, 1); |
| 2201 | 2201 | } |
| 2202 | 2202 | $action .= |
| 2203 | - (strpos($action, '?') !== false ? '&' : '?') . $args; |
|
| 2203 | + (strpos($action, '?') !== false ? '&' : '?').$args; |
|
| 2204 | 2204 | } |
| 2205 | 2205 | if (!$no_entities) { |
| 2206 | 2206 | $action = quote_amp($action); |
| 2207 | 2207 | } |
| 2208 | 2208 | |
| 2209 | 2209 | // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide |
| 2210 | - return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2210 | + return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2211 | 2211 | } |
| 2212 | 2212 | |
| 2213 | 2213 | // https://code.spip.net/@generer_url_prive |
| 2214 | 2214 | function generer_url_prive($script, $args = '', $no_entities = false) { |
| 2215 | 2215 | |
| 2216 | - return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php'); |
|
| 2216 | + return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php'); |
|
| 2217 | 2217 | } |
| 2218 | 2218 | |
| 2219 | 2219 | // Pour les formulaires en methode POST, |
@@ -2248,8 +2248,7 @@ discard block |
||
| 2248 | 2248 | . "><div>\n" |
| 2249 | 2249 | . "<input type='hidden' name='exec' value='$script1' />" |
| 2250 | 2250 | . $corps |
| 2251 | - . (!$submit ? '' : |
|
| 2252 | - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>')) |
|
| 2251 | + . (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>')) |
|
| 2253 | 2252 | . "</div></form>\n"; |
| 2254 | 2253 | } |
| 2255 | 2254 | |
@@ -2274,14 +2273,14 @@ discard block |
||
| 2274 | 2273 | ? generer_url_ecrire(_request('exec')) |
| 2275 | 2274 | : generer_url_public(); |
| 2276 | 2275 | |
| 2277 | - return "\n<form action='" . |
|
| 2278 | - $h . |
|
| 2279 | - "'" . |
|
| 2280 | - $atts . |
|
| 2281 | - ">\n" . |
|
| 2282 | - '<div>' . |
|
| 2283 | - "\n<input type='hidden' name='action' value='$script' />" . |
|
| 2284 | - $corps . |
|
| 2276 | + return "\n<form action='". |
|
| 2277 | + $h. |
|
| 2278 | + "'". |
|
| 2279 | + $atts. |
|
| 2280 | + ">\n". |
|
| 2281 | + '<div>'. |
|
| 2282 | + "\n<input type='hidden' name='action' value='$script' />". |
|
| 2283 | + $corps. |
|
| 2285 | 2284 | '</div></form>'; |
| 2286 | 2285 | } |
| 2287 | 2286 | |
@@ -2309,7 +2308,7 @@ discard block |
||
| 2309 | 2308 | : generer_url_public('', '', false, false); |
| 2310 | 2309 | $url = parametre_url($url, 'action', $script); |
| 2311 | 2310 | if ($args) { |
| 2312 | - $url .= quote_amp('&' . $args); |
|
| 2311 | + $url .= quote_amp('&'.$args); |
|
| 2313 | 2312 | } |
| 2314 | 2313 | |
| 2315 | 2314 | if ($no_entities) { |
@@ -2359,17 +2358,17 @@ discard block |
||
| 2359 | 2358 | |
| 2360 | 2359 | // le nom du repertoire plugins/ activables/desactivables |
| 2361 | 2360 | if (!defined('_DIR_PLUGINS')) { |
| 2362 | - define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/'); |
|
| 2361 | + define('_DIR_PLUGINS', _DIR_RACINE.'plugins/'); |
|
| 2363 | 2362 | } |
| 2364 | 2363 | |
| 2365 | 2364 | // le nom du repertoire des extensions/ permanentes du core, toujours actives |
| 2366 | 2365 | if (!defined('_DIR_PLUGINS_DIST')) { |
| 2367 | - define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/'); |
|
| 2366 | + define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/'); |
|
| 2368 | 2367 | } |
| 2369 | 2368 | |
| 2370 | 2369 | // le nom du repertoire des librairies |
| 2371 | 2370 | if (!defined('_DIR_LIB')) { |
| 2372 | - define('_DIR_LIB', _DIR_RACINE . 'lib/'); |
|
| 2371 | + define('_DIR_LIB', _DIR_RACINE.'lib/'); |
|
| 2373 | 2372 | } |
| 2374 | 2373 | |
| 2375 | 2374 | if (!defined('_DIR_IMG')) { |
@@ -2379,29 +2378,29 @@ discard block |
||
| 2379 | 2378 | define('_DIR_LOGOS', $pa); |
| 2380 | 2379 | } |
| 2381 | 2380 | if (!defined('_DIR_IMG_ICONES')) { |
| 2382 | - define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/'); |
|
| 2381 | + define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/'); |
|
| 2383 | 2382 | } |
| 2384 | 2383 | |
| 2385 | 2384 | if (!defined('_DIR_DUMP')) { |
| 2386 | - define('_DIR_DUMP', $ti . 'dump/'); |
|
| 2385 | + define('_DIR_DUMP', $ti.'dump/'); |
|
| 2387 | 2386 | } |
| 2388 | 2387 | if (!defined('_DIR_SESSIONS')) { |
| 2389 | - define('_DIR_SESSIONS', $ti . 'sessions/'); |
|
| 2388 | + define('_DIR_SESSIONS', $ti.'sessions/'); |
|
| 2390 | 2389 | } |
| 2391 | 2390 | if (!defined('_DIR_TRANSFERT')) { |
| 2392 | - define('_DIR_TRANSFERT', $ti . 'upload/'); |
|
| 2391 | + define('_DIR_TRANSFERT', $ti.'upload/'); |
|
| 2393 | 2392 | } |
| 2394 | 2393 | if (!defined('_DIR_CACHE')) { |
| 2395 | - define('_DIR_CACHE', $ti . 'cache/'); |
|
| 2394 | + define('_DIR_CACHE', $ti.'cache/'); |
|
| 2396 | 2395 | } |
| 2397 | 2396 | if (!defined('_DIR_CACHE_XML')) { |
| 2398 | - define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/'); |
|
| 2397 | + define('_DIR_CACHE_XML', _DIR_CACHE.'xml/'); |
|
| 2399 | 2398 | } |
| 2400 | 2399 | if (!defined('_DIR_SKELS')) { |
| 2401 | - define('_DIR_SKELS', _DIR_CACHE . 'skel/'); |
|
| 2400 | + define('_DIR_SKELS', _DIR_CACHE.'skel/'); |
|
| 2402 | 2401 | } |
| 2403 | 2402 | if (!defined('_DIR_AIDE')) { |
| 2404 | - define('_DIR_AIDE', _DIR_CACHE . 'aide/'); |
|
| 2403 | + define('_DIR_AIDE', _DIR_CACHE.'aide/'); |
|
| 2405 | 2404 | } |
| 2406 | 2405 | if (!defined('_DIR_TMP')) { |
| 2407 | 2406 | define('_DIR_TMP', $ti); |
@@ -2430,27 +2429,27 @@ discard block |
||
| 2430 | 2429 | // Declaration des fichiers |
| 2431 | 2430 | |
| 2432 | 2431 | if (!defined('_CACHE_PLUGINS_PATH')) { |
| 2433 | - define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php'); |
|
| 2432 | + define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php'); |
|
| 2434 | 2433 | } |
| 2435 | 2434 | if (!defined('_CACHE_PLUGINS_OPT')) { |
| 2436 | - define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php'); |
|
| 2435 | + define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php'); |
|
| 2437 | 2436 | } |
| 2438 | 2437 | if (!defined('_CACHE_PLUGINS_FCT')) { |
| 2439 | - define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php'); |
|
| 2438 | + define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php'); |
|
| 2440 | 2439 | } |
| 2441 | 2440 | if (!defined('_CACHE_PIPELINES')) { |
| 2442 | - define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php'); |
|
| 2441 | + define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php'); |
|
| 2443 | 2442 | } |
| 2444 | 2443 | if (!defined('_CACHE_CHEMIN')) { |
| 2445 | - define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt'); |
|
| 2444 | + define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt'); |
|
| 2446 | 2445 | } |
| 2447 | 2446 | |
| 2448 | 2447 | # attention .php obligatoire pour ecrire_fichier_securise |
| 2449 | 2448 | if (!defined('_FILE_META')) { |
| 2450 | - define('_FILE_META', $ti . 'meta_cache.php'); |
|
| 2449 | + define('_FILE_META', $ti.'meta_cache.php'); |
|
| 2451 | 2450 | } |
| 2452 | 2451 | if (!defined('_DIR_LOG')) { |
| 2453 | - define('_DIR_LOG', _DIR_TMP . 'log/'); |
|
| 2452 | + define('_DIR_LOG', _DIR_TMP.'log/'); |
|
| 2454 | 2453 | } |
| 2455 | 2454 | if (!defined('_FILE_LOG')) { |
| 2456 | 2455 | define('_FILE_LOG', 'spip'); |
@@ -2467,8 +2466,8 @@ discard block |
||
| 2467 | 2466 | if (!defined('_FILE_CONNECT')) { |
| 2468 | 2467 | define( |
| 2469 | 2468 | '_FILE_CONNECT', |
| 2470 | - (@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f |
|
| 2471 | - : (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f |
|
| 2469 | + (@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f |
|
| 2470 | + : (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f |
|
| 2472 | 2471 | : false)) |
| 2473 | 2472 | ); |
| 2474 | 2473 | } |
@@ -2480,7 +2479,7 @@ discard block |
||
| 2480 | 2479 | if (!defined('_FILE_CHMOD')) { |
| 2481 | 2480 | define( |
| 2482 | 2481 | '_FILE_CHMOD', |
| 2483 | - (@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f |
|
| 2482 | + (@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f |
|
| 2484 | 2483 | : false) |
| 2485 | 2484 | ); |
| 2486 | 2485 | } |
@@ -2493,10 +2492,10 @@ discard block |
||
| 2493 | 2492 | define('_FILE_TMP_SUFFIX', '.tmp.php'); |
| 2494 | 2493 | } |
| 2495 | 2494 | if (!defined('_FILE_CONNECT_TMP')) { |
| 2496 | - define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX); |
|
| 2495 | + define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX); |
|
| 2497 | 2496 | } |
| 2498 | 2497 | if (!defined('_FILE_CHMOD_TMP')) { |
| 2499 | - define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX); |
|
| 2498 | + define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX); |
|
| 2500 | 2499 | } |
| 2501 | 2500 | |
| 2502 | 2501 | // Definition des droits d'acces en ecriture |
@@ -2514,13 +2513,13 @@ discard block |
||
| 2514 | 2513 | define('_DEFAULT_CHARSET', 'utf-8'); |
| 2515 | 2514 | } |
| 2516 | 2515 | if (!defined('_ROOT_PLUGINS')) { |
| 2517 | - define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/'); |
|
| 2516 | + define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/'); |
|
| 2518 | 2517 | } |
| 2519 | 2518 | if (!defined('_ROOT_PLUGINS_DIST')) { |
| 2520 | - define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/'); |
|
| 2519 | + define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/'); |
|
| 2521 | 2520 | } |
| 2522 | 2521 | if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) { |
| 2523 | - define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2522 | + define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2524 | 2523 | } |
| 2525 | 2524 | |
| 2526 | 2525 | // La taille des Log |
@@ -2557,7 +2556,7 @@ discard block |
||
| 2557 | 2556 | // (non surchargeable en l'etat ; attention si on utilise include_spip() |
| 2558 | 2557 | // pour le rendre surchargeable, on va provoquer un reecriture |
| 2559 | 2558 | // systematique du noyau ou une baisse de perfs => a etudier) |
| 2560 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 2559 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 2561 | 2560 | |
| 2562 | 2561 | // charger tout de suite le path et son cache |
| 2563 | 2562 | load_path_cache(); |
@@ -2605,7 +2604,7 @@ discard block |
||
| 2605 | 2604 | !empty($_SERVER['QUERY_STRING']) |
| 2606 | 2605 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2607 | 2606 | ) { |
| 2608 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2607 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2609 | 2608 | } |
| 2610 | 2609 | } |
| 2611 | 2610 | |
@@ -2641,7 +2640,7 @@ discard block |
||
| 2641 | 2640 | ) { |
| 2642 | 2641 | if (isset($GLOBALS['meta']['adresse_site'])) { |
| 2643 | 2642 | $uri_ref = parse_url($GLOBALS['meta']['adresse_site']); |
| 2644 | - $uri_ref = ($uri_ref['path'] ?? '') . '/'; |
|
| 2643 | + $uri_ref = ($uri_ref['path'] ?? '').'/'; |
|
| 2645 | 2644 | } else { |
| 2646 | 2645 | $uri_ref = ''; |
| 2647 | 2646 | } |
@@ -2735,7 +2734,7 @@ discard block |
||
| 2735 | 2734 | } |
| 2736 | 2735 | if (!defined('_CACHE_RUBRIQUES')) { |
| 2737 | 2736 | /** Fichier cache pour le navigateur de rubrique du bandeau */ |
| 2738 | - define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt'); |
|
| 2737 | + define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt'); |
|
| 2739 | 2738 | } |
| 2740 | 2739 | if (!defined('_CACHE_RUBRIQUES_MAX')) { |
| 2741 | 2740 | /** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */ |
@@ -2839,7 +2838,7 @@ discard block |
||
| 2839 | 2838 | $memory *= 1024; |
| 2840 | 2839 | } |
| 2841 | 2840 | if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) { |
| 2842 | - @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M'); |
|
| 2841 | + @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M'); |
|
| 2843 | 2842 | if (trim(ini_get('memory_limit')) != $m) { |
| 2844 | 2843 | if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) { |
| 2845 | 2844 | define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true); |
@@ -2990,7 +2989,7 @@ discard block |
||
| 2990 | 2989 | } |
| 2991 | 2990 | if (isset($GLOBALS['visiteur_session']['nom'])) { |
| 2992 | 2991 | spip_log($GLOBALS['visiteur_session']['nom'] |
| 2993 | - . ' ' . _VAR_MODE); |
|
| 2992 | + . ' '._VAR_MODE); |
|
| 2994 | 2993 | } |
| 2995 | 2994 | } // pas autorise ? |
| 2996 | 2995 | else { |
@@ -3005,7 +3004,7 @@ discard block |
||
| 3005 | 3004 | if (strpos($self, 'page=login') === false) { |
| 3006 | 3005 | include_spip('inc/headers'); |
| 3007 | 3006 | $redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&'); |
| 3008 | - redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true)); |
|
| 3007 | + redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true)); |
|
| 3009 | 3008 | } |
| 3010 | 3009 | } |
| 3011 | 3010 | // sinon tant pis |
@@ -3049,10 +3048,10 @@ discard block |
||
| 3049 | 3048 | // mais on risque de perturber des plugins en initialisant trop tot |
| 3050 | 3049 | // certaines constantes |
| 3051 | 3050 | @spip_initialisation_core( |
| 3052 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 3053 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 3054 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3055 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3051 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 3052 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 3053 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3054 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3056 | 3055 | ); |
| 3057 | 3056 | |
| 3058 | 3057 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -3085,7 +3084,7 @@ discard block |
||
| 3085 | 3084 | } |
| 3086 | 3085 | |
| 3087 | 3086 | $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']); |
| 3088 | - if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 3087 | + if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 3089 | 3088 | $session = charger_fonction('session', 'inc'); |
| 3090 | 3089 | if ($session()) { |
| 3091 | 3090 | return $GLOBALS['visiteur_session']['statut']; |
@@ -3165,7 +3164,7 @@ discard block |
||
| 3165 | 3164 | 'definir_session', |
| 3166 | 3165 | $GLOBALS['visiteur_session'] |
| 3167 | 3166 | ? serialize($GLOBALS['visiteur_session']) |
| 3168 | - . '_' . @$_COOKIE['spip_session'] |
|
| 3167 | + . '_'.@$_COOKIE['spip_session'] |
|
| 3169 | 3168 | : '' |
| 3170 | 3169 | ); |
| 3171 | 3170 | $session = $s ? substr(md5($s), 0, 8) : ''; |
@@ -3321,11 +3320,11 @@ discard block |
||
| 3321 | 3320 | $GLOBALS['_INC_PUBLIC']++; |
| 3322 | 3321 | |
| 3323 | 3322 | // fix #4235 |
| 3324 | - $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3323 | + $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3325 | 3324 | |
| 3326 | 3325 | |
| 3327 | 3326 | foreach (is_array($fond) ? $fond : [$fond] as $f) { |
| 3328 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3327 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3329 | 3328 | |
| 3330 | 3329 | $page = evaluer_fond($f, $contexte, $connect); |
| 3331 | 3330 | if ($page === '') { |
@@ -3410,7 +3409,7 @@ discard block |
||
| 3410 | 3409 | * @return array|string |
| 3411 | 3410 | */ |
| 3412 | 3411 | function trouver_fond($nom, $dir = '', $pathinfo = false) { |
| 3413 | - $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : ''); |
|
| 3412 | + $f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : ''); |
|
| 3414 | 3413 | if (!$pathinfo) { |
| 3415 | 3414 | return $f; |
| 3416 | 3415 | } |