@@ -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 | |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | foreach ($regexp as $r => $e) { |
| 598 | 598 | $regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e)); |
| 599 | 599 | } |
| 600 | - $regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,'; |
|
| 600 | + $regexp = ',^('.implode('|', $regexp).'[[]?[]]?)(=.*)?$,'; |
|
| 601 | 601 | $ajouts = array_flip(explode('|', $c)); |
| 602 | 602 | $u = is_array($v) ? $v : rawurlencode((string) $v); |
| 603 | 603 | $testv = (is_array($v) ? count($v) : strlen((string) $v)); |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | // Ajout. Pour une variable, remplacer au meme endroit, |
| 625 | 625 | // pour un tableau ce sera fait dans la prochaine boucle |
| 626 | 626 | elseif (substr($r[1], -2) != '[]') { |
| 627 | - $url[$n] = $r[1] . '=' . $u; |
|
| 627 | + $url[$n] = $r[1].'='.$u; |
|
| 628 | 628 | unset($ajouts[$r[1]]); |
| 629 | 629 | } |
| 630 | 630 | // Pour les tableaux on laisse tomber les valeurs de |
@@ -645,11 +645,11 @@ discard block |
||
| 645 | 645 | } elseif ($testv) { |
| 646 | 646 | foreach ($ajouts as $k => $n) { |
| 647 | 647 | if (!is_array($v)) { |
| 648 | - $url[] = $k . '=' . $u; |
|
| 648 | + $url[] = $k.'='.$u; |
|
| 649 | 649 | } else { |
| 650 | - $id = (substr($k, -2) == '[]') ? $k : ($k . '[]'); |
|
| 650 | + $id = (substr($k, -2) == '[]') ? $k : ($k.'[]'); |
|
| 651 | 651 | foreach ($v as $w) { |
| 652 | - $url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 652 | + $url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 653 | 653 | } |
| 654 | 654 | } |
| 655 | 655 | } |
@@ -660,10 +660,10 @@ discard block |
||
| 660 | 660 | |
| 661 | 661 | // recomposer l'adresse |
| 662 | 662 | if ($url) { |
| 663 | - $a .= '?' . join($sep, $url); |
|
| 663 | + $a .= '?'.join($sep, $url); |
|
| 664 | 664 | } |
| 665 | 665 | |
| 666 | - return $a . $ancre; |
|
| 666 | + return $a.$ancre; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | /** |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | translitteration($ancre) |
| 696 | 696 | ); |
| 697 | 697 | } |
| 698 | - return $url . (strlen($ancre) ? '#' . $ancre : ''); |
|
| 698 | + return $url.(strlen($ancre) ? '#'.$ancre : ''); |
|
| 699 | 699 | } |
| 700 | 700 | |
| 701 | 701 | /** |
@@ -811,7 +811,7 @@ discard block |
||
| 811 | 811 | * @return bool |
| 812 | 812 | */ |
| 813 | 813 | function test_plugin_actif($plugin) { |
| 814 | - return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false; |
|
| 814 | + return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false; |
|
| 815 | 815 | } |
| 816 | 816 | |
| 817 | 817 | /** |
@@ -943,7 +943,7 @@ discard block |
||
| 943 | 943 | $value = interdire_scripts($value, -1); |
| 944 | 944 | } |
| 945 | 945 | if (!empty($options['class'])) { |
| 946 | - $value = "<span class='" . $options['class'] . "'>$value</span>"; |
|
| 946 | + $value = "<span class='".$options['class']."'>$value</span>"; |
|
| 947 | 947 | } |
| 948 | 948 | $text = str_replace("@$name@", $value, $text); |
| 949 | 949 | unset($args[$name]); |
@@ -952,7 +952,7 @@ discard block |
||
| 952 | 952 | // Si des variables n'ont pas ete inserees, le signaler |
| 953 | 953 | // (chaines de langues pas a jour) |
| 954 | 954 | if ($args) { |
| 955 | - spip_log("$f: variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 955 | + spip_log("$f: variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 956 | 956 | } |
| 957 | 957 | } |
| 958 | 958 | |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | function joli_repertoire($rep) { |
| 977 | 977 | $a = substr($rep, 0, 1); |
| 978 | 978 | if ($a <> '.' and $a <> '/') { |
| 979 | - $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep; |
|
| 979 | + $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep; |
|
| 980 | 980 | } |
| 981 | 981 | $rep = preg_replace(',(^\.\.\/),', '', $rep); |
| 982 | 982 | |
@@ -1030,7 +1030,7 @@ discard block |
||
| 1030 | 1030 | $p -= ($x * 1000); |
| 1031 | 1031 | } |
| 1032 | 1032 | |
| 1033 | - return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1033 | + return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1034 | 1034 | } |
| 1035 | 1035 | } |
| 1036 | 1036 | |
@@ -1097,7 +1097,7 @@ discard block |
||
| 1097 | 1097 | if ($taches and count($taches) and !spip_connect()) { |
| 1098 | 1098 | return false; |
| 1099 | 1099 | } |
| 1100 | - spip_log('cron !', 'jq' . _LOG_DEBUG); |
|
| 1100 | + spip_log('cron !', 'jq'._LOG_DEBUG); |
|
| 1101 | 1101 | if ($genie = charger_fonction('genie', 'inc', true)) { |
| 1102 | 1102 | return $genie($taches); |
| 1103 | 1103 | } |
@@ -1201,7 +1201,7 @@ discard block |
||
| 1201 | 1201 | |
| 1202 | 1202 | if ($queue_next_job_time == -1) { |
| 1203 | 1203 | if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) { |
| 1204 | - define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt'); |
|
| 1204 | + define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt'); |
|
| 1205 | 1205 | } |
| 1206 | 1206 | // utiliser un cache memoire si dispo |
| 1207 | 1207 | if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) { |
@@ -1270,8 +1270,8 @@ discard block |
||
| 1270 | 1270 | $src = ''; |
| 1271 | 1271 | } |
| 1272 | 1272 | if ($script) { |
| 1273 | - $script = ("/*<![CDATA[*/\n" . |
|
| 1274 | - preg_replace(',</([^>]*)>,', '<\/\1>', $script) . |
|
| 1273 | + $script = ("/*<![CDATA[*/\n". |
|
| 1274 | + preg_replace(',</([^>]*)>,', '<\/\1>', $script). |
|
| 1275 | 1275 | '/*]]>*/'); |
| 1276 | 1276 | } |
| 1277 | 1277 | if ($noscript) { |
@@ -1357,13 +1357,13 @@ discard block |
||
| 1357 | 1357 | if ($path_base == null) { |
| 1358 | 1358 | // Chemin standard depuis l'espace public |
| 1359 | 1359 | $path = defined('_SPIP_PATH') ? _SPIP_PATH : |
| 1360 | - _DIR_RACINE . ':' . |
|
| 1361 | - _DIR_RACINE . 'squelettes-dist/:' . |
|
| 1362 | - _DIR_RACINE . 'prive/:' . |
|
| 1360 | + _DIR_RACINE.':'. |
|
| 1361 | + _DIR_RACINE.'squelettes-dist/:'. |
|
| 1362 | + _DIR_RACINE.'prive/:'. |
|
| 1363 | 1363 | _DIR_RESTREINT; |
| 1364 | 1364 | // Ajouter squelettes/ |
| 1365 | - if (@is_dir(_DIR_RACINE . 'squelettes')) { |
|
| 1366 | - $path = _DIR_RACINE . 'squelettes/:' . $path; |
|
| 1365 | + if (@is_dir(_DIR_RACINE.'squelettes')) { |
|
| 1366 | + $path = _DIR_RACINE.'squelettes/:'.$path; |
|
| 1367 | 1367 | } |
| 1368 | 1368 | foreach (explode(':', $path) as $dir) { |
| 1369 | 1369 | if (strlen($dir) and substr($dir, -1) != '/') { |
@@ -1375,7 +1375,7 @@ discard block |
||
| 1375 | 1375 | // Et le(s) dossier(s) des squelettes nommes |
| 1376 | 1376 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1377 | 1377 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1378 | - array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1378 | + array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/'); |
|
| 1379 | 1379 | } |
| 1380 | 1380 | } |
| 1381 | 1381 | $GLOBALS['path_sig'] = md5(serialize($path_full)); |
@@ -1386,7 +1386,7 @@ discard block |
||
| 1386 | 1386 | |
| 1387 | 1387 | if (is_array($dir_path) or strlen($dir_path)) { |
| 1388 | 1388 | $tete = ''; |
| 1389 | - if (reset($path_base) == _DIR_RACINE . 'squelettes/') { |
|
| 1389 | + if (reset($path_base) == _DIR_RACINE.'squelettes/') { |
|
| 1390 | 1390 | $tete = array_shift($path_base); |
| 1391 | 1391 | } |
| 1392 | 1392 | $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path)); |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | // Et le(s) dossier(s) des squelettes nommes |
| 1408 | 1408 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1409 | 1409 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1410 | - array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1410 | + array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/'); |
|
| 1411 | 1411 | } |
| 1412 | 1412 | } |
| 1413 | 1413 | |
@@ -1478,14 +1478,14 @@ discard block |
||
| 1478 | 1478 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 1479 | 1479 | if ( |
| 1480 | 1480 | preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m) |
| 1481 | - and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg' |
|
| 1481 | + and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg' |
|
| 1482 | 1482 | and $f = find_in_theme("$file_svg_generique") |
| 1483 | 1483 | ) { |
| 1484 | - if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) { |
|
| 1484 | + if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) { |
|
| 1485 | 1485 | return $themefiles["$subdir$file"] = $fsize; |
| 1486 | 1486 | } |
| 1487 | 1487 | else { |
| 1488 | - return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px'; |
|
| 1488 | + return $themefiles["$subdir$file"] = "$f?".$m[1].'px'; |
|
| 1489 | 1489 | } |
| 1490 | 1490 | } |
| 1491 | 1491 | |
@@ -1495,7 +1495,7 @@ discard block |
||
| 1495 | 1495 | return $themefiles["$subdir$file"] = $f; |
| 1496 | 1496 | } |
| 1497 | 1497 | } |
| 1498 | - spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme'); |
|
| 1498 | + spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme'); |
|
| 1499 | 1499 | |
| 1500 | 1500 | return $themefiles["$subdir$file"] = ''; |
| 1501 | 1501 | } |
@@ -1603,8 +1603,8 @@ discard block |
||
| 1603 | 1603 | return false; |
| 1604 | 1604 | } |
| 1605 | 1605 | if ($include and !isset($inc[$dirname][$file])) { |
| 1606 | - include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1607 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1606 | + include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1607 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1608 | 1608 | } |
| 1609 | 1609 | |
| 1610 | 1610 | return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
@@ -1617,14 +1617,14 @@ discard block |
||
| 1617 | 1617 | } |
| 1618 | 1618 | |
| 1619 | 1619 | foreach (creer_chemin() as $dir) { |
| 1620 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 1621 | - $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a); |
|
| 1620 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 1621 | + $dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a); |
|
| 1622 | 1622 | } |
| 1623 | 1623 | if ($dirs[$a]) { |
| 1624 | - if (file_exists(_ROOT_CWD . ($a .= $file))) { |
|
| 1624 | + if (file_exists(_ROOT_CWD.($a .= $file))) { |
|
| 1625 | 1625 | if ($include and !isset($inc[$dirname][$file])) { |
| 1626 | - include_once _ROOT_CWD . $a; |
|
| 1627 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1626 | + include_once _ROOT_CWD.$a; |
|
| 1627 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1628 | 1628 | } |
| 1629 | 1629 | if (!defined('_SAUVER_CHEMIN')) { |
| 1630 | 1630 | // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher |
@@ -1634,7 +1634,7 @@ discard block |
||
| 1634 | 1634 | define('_SAUVER_CHEMIN', true); |
| 1635 | 1635 | } |
| 1636 | 1636 | |
| 1637 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a; |
|
| 1637 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a; |
|
| 1638 | 1638 | } |
| 1639 | 1639 | } |
| 1640 | 1640 | } |
@@ -1660,7 +1660,7 @@ discard block |
||
| 1660 | 1660 | define('_SAUVER_CHEMIN', true); |
| 1661 | 1661 | } |
| 1662 | 1662 | |
| 1663 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false; |
|
| 1663 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false; |
|
| 1664 | 1664 | } |
| 1665 | 1665 | |
| 1666 | 1666 | function clear_path_cache() { |
@@ -1730,12 +1730,12 @@ discard block |
||
| 1730 | 1730 | // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue |
| 1731 | 1731 | // on a pas encore inclus flock.php |
| 1732 | 1732 | if (!function_exists('preg_files')) { |
| 1733 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 1733 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 1734 | 1734 | } |
| 1735 | 1735 | |
| 1736 | 1736 | // Parcourir le chemin |
| 1737 | 1737 | foreach (creer_chemin() as $d) { |
| 1738 | - $f = $d . $dir; |
|
| 1738 | + $f = $d.$dir; |
|
| 1739 | 1739 | if (@is_dir($f)) { |
| 1740 | 1740 | $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs); |
| 1741 | 1741 | foreach ($liste as $chemin) { |
@@ -1785,9 +1785,9 @@ discard block |
||
| 1785 | 1785 | if ($type === 'defaut') { |
| 1786 | 1786 | $objet = objet_type($quoi); |
| 1787 | 1787 | if ( |
| 1788 | - $f = charger_fonction('generer_' . $objet . '_url', 'urls', true) |
|
| 1788 | + $f = charger_fonction('generer_'.$objet.'_url', 'urls', true) |
|
| 1789 | 1789 | // deprecated |
| 1790 | - or $f = charger_fonction('generer_url_' . $objet, 'urls', true) |
|
| 1790 | + or $f = charger_fonction('generer_url_'.$objet, 'urls', true) |
|
| 1791 | 1791 | ) { |
| 1792 | 1792 | return $f; |
| 1793 | 1793 | } |
@@ -1800,7 +1800,7 @@ discard block |
||
| 1800 | 1800 | } |
| 1801 | 1801 | |
| 1802 | 1802 | // inclure le module d'url |
| 1803 | - include_spip('urls/' . $url_type); |
|
| 1803 | + include_spip('urls/'.$url_type); |
|
| 1804 | 1804 | |
| 1805 | 1805 | switch ($quoi) { |
| 1806 | 1806 | case 'page': |
@@ -1956,8 +1956,8 @@ discard block |
||
| 1956 | 1956 | include_spip('base/connect_sql'); |
| 1957 | 1957 | $id_type = id_table_objet($entite, $public); |
| 1958 | 1958 | |
| 1959 | - return _DIR_RACINE . get_spip_script('./') |
|
| 1960 | - . '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public" |
|
| 1959 | + return _DIR_RACINE.get_spip_script('./') |
|
| 1960 | + . '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public" |
|
| 1961 | 1961 | . (!$args ? '' : "&$args") |
| 1962 | 1962 | . (!$ancre ? '' : "#$ancre"); |
| 1963 | 1963 | } |
@@ -2128,7 +2128,7 @@ discard block |
||
| 2128 | 2128 | !empty($_SERVER['QUERY_STRING']) |
| 2129 | 2129 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2130 | 2130 | ) { |
| 2131 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2131 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2132 | 2132 | } |
| 2133 | 2133 | } |
| 2134 | 2134 | } |
@@ -2163,9 +2163,9 @@ discard block |
||
| 2163 | 2163 | array_shift($myself); |
| 2164 | 2164 | $myself = implode('/', $myself); |
| 2165 | 2165 | } |
| 2166 | - $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/'; |
|
| 2166 | + $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/'; |
|
| 2167 | 2167 | |
| 2168 | - $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/'); |
|
| 2168 | + $url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/'); |
|
| 2169 | 2169 | |
| 2170 | 2170 | return $url; |
| 2171 | 2171 | } |
@@ -2204,16 +2204,16 @@ discard block |
||
| 2204 | 2204 | function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) { |
| 2205 | 2205 | $script ??= ''; |
| 2206 | 2206 | if (!$rel) { |
| 2207 | - $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT; |
|
| 2207 | + $rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT; |
|
| 2208 | 2208 | } else { |
| 2209 | 2209 | if (!is_string($rel)) { |
| 2210 | - $rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT; |
|
| 2210 | + $rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT; |
|
| 2211 | 2211 | } |
| 2212 | 2212 | } |
| 2213 | 2213 | |
| 2214 | 2214 | [$script, $ancre] = array_pad(explode('#', $script), 2, null); |
| 2215 | 2215 | if ($script and ($script <> 'accueil' or $rel)) { |
| 2216 | - $args = "?exec=$script" . (!$args ? '' : "&$args"); |
|
| 2216 | + $args = "?exec=$script".(!$args ? '' : "&$args"); |
|
| 2217 | 2217 | } elseif ($args) { |
| 2218 | 2218 | $args = "?$args"; |
| 2219 | 2219 | } |
@@ -2221,7 +2221,7 @@ discard block |
||
| 2221 | 2221 | $args .= "#$ancre"; |
| 2222 | 2222 | } |
| 2223 | 2223 | |
| 2224 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2224 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2225 | 2225 | } |
| 2226 | 2226 | |
| 2227 | 2227 | // |
@@ -2303,10 +2303,10 @@ discard block |
||
| 2303 | 2303 | $action = parametre_url($action, _SPIP_PAGE, $script, '&'); |
| 2304 | 2304 | } |
| 2305 | 2305 | if ($args) { |
| 2306 | - $action .= (strpos($action, '?') !== false ? '&' : '?') . $args; |
|
| 2306 | + $action .= (strpos($action, '?') !== false ? '&' : '?').$args; |
|
| 2307 | 2307 | } |
| 2308 | 2308 | // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide |
| 2309 | - $url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2309 | + $url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2310 | 2310 | } |
| 2311 | 2311 | |
| 2312 | 2312 | if (!$no_entities) { |
@@ -2318,7 +2318,7 @@ discard block |
||
| 2318 | 2318 | |
| 2319 | 2319 | function generer_url_prive($script, $args = '', $no_entities = false) { |
| 2320 | 2320 | |
| 2321 | - return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php'); |
|
| 2321 | + return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php'); |
|
| 2322 | 2322 | } |
| 2323 | 2323 | |
| 2324 | 2324 | // Pour les formulaires en methode POST, |
@@ -2353,8 +2353,7 @@ discard block |
||
| 2353 | 2353 | . "><div>\n" |
| 2354 | 2354 | . "<input type='hidden' name='exec' value='$script1' />" |
| 2355 | 2355 | . $corps |
| 2356 | - . (!$submit ? '' : |
|
| 2357 | - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>')) |
|
| 2356 | + . (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>')) |
|
| 2358 | 2357 | . "</div></form>\n"; |
| 2359 | 2358 | } |
| 2360 | 2359 | |
@@ -2379,14 +2378,14 @@ discard block |
||
| 2379 | 2378 | ? generer_url_ecrire(_request('exec')) |
| 2380 | 2379 | : generer_url_public(); |
| 2381 | 2380 | |
| 2382 | - return "\n<form action='" . |
|
| 2383 | - $h . |
|
| 2384 | - "'" . |
|
| 2385 | - $atts . |
|
| 2386 | - ">\n" . |
|
| 2387 | - '<div>' . |
|
| 2388 | - "\n<input type='hidden' name='action' value='$script' />" . |
|
| 2389 | - $corps . |
|
| 2381 | + return "\n<form action='". |
|
| 2382 | + $h. |
|
| 2383 | + "'". |
|
| 2384 | + $atts. |
|
| 2385 | + ">\n". |
|
| 2386 | + '<div>'. |
|
| 2387 | + "\n<input type='hidden' name='action' value='$script' />". |
|
| 2388 | + $corps. |
|
| 2390 | 2389 | '</div></form>'; |
| 2391 | 2390 | } |
| 2392 | 2391 | |
@@ -2414,7 +2413,7 @@ discard block |
||
| 2414 | 2413 | : generer_url_public('', '', false, false); |
| 2415 | 2414 | $url = parametre_url($url, 'action', $script); |
| 2416 | 2415 | if ($args) { |
| 2417 | - $url .= quote_amp('&' . $args); |
|
| 2416 | + $url .= quote_amp('&'.$args); |
|
| 2418 | 2417 | } |
| 2419 | 2418 | |
| 2420 | 2419 | if ($no_entities) { |
@@ -2448,9 +2447,9 @@ discard block |
||
| 2448 | 2447 | } |
| 2449 | 2448 | $url = |
| 2450 | 2449 | (($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './') |
| 2451 | - . $script . '/' |
|
| 2450 | + . $script.'/' |
|
| 2452 | 2451 | . ($path ? trim($path, '/') : '') |
| 2453 | - . ($args ? '?' . quote_amp($args) : ''); |
|
| 2452 | + . ($args ? '?'.quote_amp($args) : ''); |
|
| 2454 | 2453 | |
| 2455 | 2454 | if ($no_entities) { |
| 2456 | 2455 | $url = str_replace('&', '&', $url); |
@@ -2499,17 +2498,17 @@ discard block |
||
| 2499 | 2498 | |
| 2500 | 2499 | // le nom du repertoire plugins/ activables/desactivables |
| 2501 | 2500 | if (!defined('_DIR_PLUGINS')) { |
| 2502 | - define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/'); |
|
| 2501 | + define('_DIR_PLUGINS', _DIR_RACINE.'plugins/'); |
|
| 2503 | 2502 | } |
| 2504 | 2503 | |
| 2505 | 2504 | // le nom du repertoire des extensions/ permanentes du core, toujours actives |
| 2506 | 2505 | if (!defined('_DIR_PLUGINS_DIST')) { |
| 2507 | - define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/'); |
|
| 2506 | + define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/'); |
|
| 2508 | 2507 | } |
| 2509 | 2508 | |
| 2510 | 2509 | // le nom du repertoire des librairies |
| 2511 | 2510 | if (!defined('_DIR_LIB')) { |
| 2512 | - define('_DIR_LIB', _DIR_RACINE . 'lib/'); |
|
| 2511 | + define('_DIR_LIB', _DIR_RACINE.'lib/'); |
|
| 2513 | 2512 | } |
| 2514 | 2513 | |
| 2515 | 2514 | if (!defined('_DIR_IMG')) { |
@@ -2519,29 +2518,29 @@ discard block |
||
| 2519 | 2518 | define('_DIR_LOGOS', $pa); |
| 2520 | 2519 | } |
| 2521 | 2520 | if (!defined('_DIR_IMG_ICONES')) { |
| 2522 | - define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/'); |
|
| 2521 | + define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/'); |
|
| 2523 | 2522 | } |
| 2524 | 2523 | |
| 2525 | 2524 | if (!defined('_DIR_DUMP')) { |
| 2526 | - define('_DIR_DUMP', $ti . 'dump/'); |
|
| 2525 | + define('_DIR_DUMP', $ti.'dump/'); |
|
| 2527 | 2526 | } |
| 2528 | 2527 | if (!defined('_DIR_SESSIONS')) { |
| 2529 | - define('_DIR_SESSIONS', $ti . 'sessions/'); |
|
| 2528 | + define('_DIR_SESSIONS', $ti.'sessions/'); |
|
| 2530 | 2529 | } |
| 2531 | 2530 | if (!defined('_DIR_TRANSFERT')) { |
| 2532 | - define('_DIR_TRANSFERT', $ti . 'upload/'); |
|
| 2531 | + define('_DIR_TRANSFERT', $ti.'upload/'); |
|
| 2533 | 2532 | } |
| 2534 | 2533 | if (!defined('_DIR_CACHE')) { |
| 2535 | - define('_DIR_CACHE', $ti . 'cache/'); |
|
| 2534 | + define('_DIR_CACHE', $ti.'cache/'); |
|
| 2536 | 2535 | } |
| 2537 | 2536 | if (!defined('_DIR_CACHE_XML')) { |
| 2538 | - define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/'); |
|
| 2537 | + define('_DIR_CACHE_XML', _DIR_CACHE.'xml/'); |
|
| 2539 | 2538 | } |
| 2540 | 2539 | if (!defined('_DIR_SKELS')) { |
| 2541 | - define('_DIR_SKELS', _DIR_CACHE . 'skel/'); |
|
| 2540 | + define('_DIR_SKELS', _DIR_CACHE.'skel/'); |
|
| 2542 | 2541 | } |
| 2543 | 2542 | if (!defined('_DIR_AIDE')) { |
| 2544 | - define('_DIR_AIDE', _DIR_CACHE . 'aide/'); |
|
| 2543 | + define('_DIR_AIDE', _DIR_CACHE.'aide/'); |
|
| 2545 | 2544 | } |
| 2546 | 2545 | if (!defined('_DIR_TMP')) { |
| 2547 | 2546 | define('_DIR_TMP', $ti); |
@@ -2570,27 +2569,27 @@ discard block |
||
| 2570 | 2569 | // Declaration des fichiers |
| 2571 | 2570 | |
| 2572 | 2571 | if (!defined('_CACHE_PLUGINS_PATH')) { |
| 2573 | - define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php'); |
|
| 2572 | + define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php'); |
|
| 2574 | 2573 | } |
| 2575 | 2574 | if (!defined('_CACHE_PLUGINS_OPT')) { |
| 2576 | - define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php'); |
|
| 2575 | + define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php'); |
|
| 2577 | 2576 | } |
| 2578 | 2577 | if (!defined('_CACHE_PLUGINS_FCT')) { |
| 2579 | - define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php'); |
|
| 2578 | + define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php'); |
|
| 2580 | 2579 | } |
| 2581 | 2580 | if (!defined('_CACHE_PIPELINES')) { |
| 2582 | - define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php'); |
|
| 2581 | + define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php'); |
|
| 2583 | 2582 | } |
| 2584 | 2583 | if (!defined('_CACHE_CHEMIN')) { |
| 2585 | - define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt'); |
|
| 2584 | + define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt'); |
|
| 2586 | 2585 | } |
| 2587 | 2586 | |
| 2588 | 2587 | # attention .php obligatoire pour ecrire_fichier_securise |
| 2589 | 2588 | if (!defined('_FILE_META')) { |
| 2590 | - define('_FILE_META', $ti . 'meta_cache.php'); |
|
| 2589 | + define('_FILE_META', $ti.'meta_cache.php'); |
|
| 2591 | 2590 | } |
| 2592 | 2591 | if (!defined('_DIR_LOG')) { |
| 2593 | - define('_DIR_LOG', _DIR_TMP . 'log/'); |
|
| 2592 | + define('_DIR_LOG', _DIR_TMP.'log/'); |
|
| 2594 | 2593 | } |
| 2595 | 2594 | if (!defined('_FILE_LOG')) { |
| 2596 | 2595 | define('_FILE_LOG', 'spip'); |
@@ -2607,8 +2606,8 @@ discard block |
||
| 2607 | 2606 | if (!defined('_FILE_CONNECT')) { |
| 2608 | 2607 | define( |
| 2609 | 2608 | '_FILE_CONNECT', |
| 2610 | - (@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f |
|
| 2611 | - : (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f |
|
| 2609 | + (@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f |
|
| 2610 | + : (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f |
|
| 2612 | 2611 | : false)) |
| 2613 | 2612 | ); |
| 2614 | 2613 | } |
@@ -2620,7 +2619,7 @@ discard block |
||
| 2620 | 2619 | if (!defined('_FILE_CHMOD')) { |
| 2621 | 2620 | define( |
| 2622 | 2621 | '_FILE_CHMOD', |
| 2623 | - (@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f |
|
| 2622 | + (@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f |
|
| 2624 | 2623 | : false) |
| 2625 | 2624 | ); |
| 2626 | 2625 | } |
@@ -2633,10 +2632,10 @@ discard block |
||
| 2633 | 2632 | define('_FILE_TMP_SUFFIX', '.tmp.php'); |
| 2634 | 2633 | } |
| 2635 | 2634 | if (!defined('_FILE_CONNECT_TMP')) { |
| 2636 | - define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX); |
|
| 2635 | + define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX); |
|
| 2637 | 2636 | } |
| 2638 | 2637 | if (!defined('_FILE_CHMOD_TMP')) { |
| 2639 | - define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX); |
|
| 2638 | + define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX); |
|
| 2640 | 2639 | } |
| 2641 | 2640 | |
| 2642 | 2641 | // Definition des droits d'acces en ecriture |
@@ -2654,13 +2653,13 @@ discard block |
||
| 2654 | 2653 | define('_DEFAULT_CHARSET', 'utf-8'); |
| 2655 | 2654 | } |
| 2656 | 2655 | if (!defined('_ROOT_PLUGINS')) { |
| 2657 | - define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/'); |
|
| 2656 | + define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/'); |
|
| 2658 | 2657 | } |
| 2659 | 2658 | if (!defined('_ROOT_PLUGINS_DIST')) { |
| 2660 | - define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/'); |
|
| 2659 | + define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/'); |
|
| 2661 | 2660 | } |
| 2662 | 2661 | if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) { |
| 2663 | - define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2662 | + define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2664 | 2663 | } |
| 2665 | 2664 | |
| 2666 | 2665 | // La taille des Log |
@@ -2697,7 +2696,7 @@ discard block |
||
| 2697 | 2696 | // (non surchargeable en l'etat ; attention si on utilise include_spip() |
| 2698 | 2697 | // pour le rendre surchargeable, on va provoquer un reecriture |
| 2699 | 2698 | // systematique du noyau ou une baisse de perfs => a etudier) |
| 2700 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 2699 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 2701 | 2700 | |
| 2702 | 2701 | // charger tout de suite le path et son cache |
| 2703 | 2702 | load_path_cache(); |
@@ -2733,7 +2732,7 @@ discard block |
||
| 2733 | 2732 | !empty($_SERVER['QUERY_STRING']) |
| 2734 | 2733 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2735 | 2734 | ) { |
| 2736 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2735 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2737 | 2736 | } |
| 2738 | 2737 | } |
| 2739 | 2738 | |
@@ -2769,7 +2768,7 @@ discard block |
||
| 2769 | 2768 | ) { |
| 2770 | 2769 | if (isset($GLOBALS['meta']['adresse_site'])) { |
| 2771 | 2770 | $uri_ref = parse_url($GLOBALS['meta']['adresse_site']); |
| 2772 | - $uri_ref = ($uri_ref['path'] ?? '') . '/'; |
|
| 2771 | + $uri_ref = ($uri_ref['path'] ?? '').'/'; |
|
| 2773 | 2772 | } else { |
| 2774 | 2773 | $uri_ref = ''; |
| 2775 | 2774 | } |
@@ -2863,7 +2862,7 @@ discard block |
||
| 2863 | 2862 | } |
| 2864 | 2863 | if (!defined('_CACHE_RUBRIQUES')) { |
| 2865 | 2864 | /** Fichier cache pour le navigateur de rubrique du bandeau */ |
| 2866 | - define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt'); |
|
| 2865 | + define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt'); |
|
| 2867 | 2866 | } |
| 2868 | 2867 | if (!defined('_CACHE_RUBRIQUES_MAX')) { |
| 2869 | 2868 | /** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */ |
@@ -3085,7 +3084,7 @@ discard block |
||
| 3085 | 3084 | } |
| 3086 | 3085 | if (isset($GLOBALS['visiteur_session']['nom'])) { |
| 3087 | 3086 | spip_log($GLOBALS['visiteur_session']['nom'] |
| 3088 | - . ' ' . _VAR_MODE); |
|
| 3087 | + . ' '._VAR_MODE); |
|
| 3089 | 3088 | } |
| 3090 | 3089 | } // pas autorise ? |
| 3091 | 3090 | else { |
@@ -3100,7 +3099,7 @@ discard block |
||
| 3100 | 3099 | if (strpos($self, 'page=login') === false) { |
| 3101 | 3100 | include_spip('inc/headers'); |
| 3102 | 3101 | $redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&'); |
| 3103 | - redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true)); |
|
| 3102 | + redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true)); |
|
| 3104 | 3103 | } |
| 3105 | 3104 | } |
| 3106 | 3105 | // sinon tant pis |
@@ -3150,10 +3149,10 @@ discard block |
||
| 3150 | 3149 | **/ |
| 3151 | 3150 | function verifier_visiteur() { |
| 3152 | 3151 | @spip_initialisation_core( |
| 3153 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 3154 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 3155 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3156 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3152 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 3153 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 3154 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3155 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3157 | 3156 | ); |
| 3158 | 3157 | |
| 3159 | 3158 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -3186,7 +3185,7 @@ discard block |
||
| 3186 | 3185 | } |
| 3187 | 3186 | |
| 3188 | 3187 | $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']); |
| 3189 | - if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 3188 | + if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 3190 | 3189 | $session = charger_fonction('session', 'inc'); |
| 3191 | 3190 | if ($session()) { |
| 3192 | 3191 | return $GLOBALS['visiteur_session']['statut']; |
@@ -3266,7 +3265,7 @@ discard block |
||
| 3266 | 3265 | 'definir_session', |
| 3267 | 3266 | $GLOBALS['visiteur_session'] |
| 3268 | 3267 | ? serialize($GLOBALS['visiteur_session']) |
| 3269 | - . '_' . @$_COOKIE['spip_session'] |
|
| 3268 | + . '_'.@$_COOKIE['spip_session'] |
|
| 3270 | 3269 | : '' |
| 3271 | 3270 | ); |
| 3272 | 3271 | $session = $s ? substr(md5($s), 0, 8) : ''; |
@@ -3422,11 +3421,11 @@ discard block |
||
| 3422 | 3421 | $GLOBALS['_INC_PUBLIC']++; |
| 3423 | 3422 | |
| 3424 | 3423 | // fix #4235 |
| 3425 | - $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3424 | + $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 3426 | 3425 | |
| 3427 | 3426 | |
| 3428 | 3427 | foreach (is_array($fond) ? $fond : [$fond] as $f) { |
| 3429 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3428 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3430 | 3429 | |
| 3431 | 3430 | $page = evaluer_fond($f, $contexte, $connect); |
| 3432 | 3431 | if ($page === '') { |
@@ -3511,7 +3510,7 @@ discard block |
||
| 3511 | 3510 | * @return array|string |
| 3512 | 3511 | */ |
| 3513 | 3512 | function trouver_fond($nom, $dir = '', $pathinfo = false) { |
| 3514 | - $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : ''); |
|
| 3513 | + $f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : ''); |
|
| 3515 | 3514 | if (!$pathinfo) { |
| 3516 | 3515 | return $f; |
| 3517 | 3516 | } |