@@ -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,19 +98,19 @@ 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 | 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 2216 | 2216 | $args .= "#$ancre"; |
| 2217 | 2217 | } |
| 2218 | 2218 | |
| 2219 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2219 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2220 | 2220 | } |
| 2221 | 2221 | |
| 2222 | 2222 | // |
@@ -2298,10 +2298,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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('&', '&', $url); |
@@ -2494,17 +2493,17 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -3157,10 +3156,10 @@ discard block |
||
| 3157 | 3156 | **/ |
| 3158 | 3157 | function verifier_visiteur() { |
| 3159 | 3158 | @spip_initialisation_core( |
| 3160 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 3161 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 3162 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3163 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3159 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 3160 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 3161 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3162 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3164 | 3163 | ); |
| 3165 | 3164 | |
| 3166 | 3165 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -3193,7 +3192,7 @@ discard block |
||
| 3193 | 3192 | } |
| 3194 | 3193 | |
| 3195 | 3194 | $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']); |
| 3196 | - if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 3195 | + if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 3197 | 3196 | $session = charger_fonction('session', 'inc'); |
| 3198 | 3197 | if ($session()) { |
| 3199 | 3198 | return $GLOBALS['visiteur_session']['statut']; |
@@ -3273,7 +3272,7 @@ discard block |
||
| 3273 | 3272 | 'definir_session', |
| 3274 | 3273 | $GLOBALS['visiteur_session'] |
| 3275 | 3274 | ? serialize($GLOBALS['visiteur_session']) |
| 3276 | - . '_' . @$_COOKIE['spip_session'] |
|
| 3275 | + . '_'.@$_COOKIE['spip_session'] |
|
| 3277 | 3276 | : '' |
| 3278 | 3277 | ); |
| 3279 | 3278 | $session = $s ? substr(md5($s), 0, 8) : ''; |
@@ -3429,11 +3428,11 @@ discard block |
||
| 3429 | 3428 | $GLOBALS['_INC_PUBLIC']++; |
| 3430 | 3429 | |
| 3431 | 3430 | // fix #4235 |
| 3432 | - $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3431 | + $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3433 | 3432 | |
| 3434 | 3433 | |
| 3435 | 3434 | foreach (is_array($fond) ? $fond : [$fond] as $f) { |
| 3436 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3435 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3437 | 3436 | |
| 3438 | 3437 | $page = evaluer_fond($f, $contexte, $connect); |
| 3439 | 3438 | if ($page === '') { |
@@ -3518,7 +3517,7 @@ discard block |
||
| 3518 | 3517 | * @return array|string |
| 3519 | 3518 | */ |
| 3520 | 3519 | function trouver_fond($nom, $dir = '', $pathinfo = false) { |
| 3521 | - $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : ''); |
|
| 3520 | + $f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : ''); |
|
| 3522 | 3521 | if (!$pathinfo) { |
| 3523 | 3522 | return $f; |
| 3524 | 3523 | } |