@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * @return bool |
| 10 | 10 | */ |
| 11 | 11 | function test_plugin_actif($plugin) { |
| 12 | - return ($plugin && defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false; |
|
| 12 | + return ($plugin && defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false; |
|
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | /** |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | function joli_repertoire($rep) { |
| 25 | 25 | $a = substr($rep, 0, 1); |
| 26 | 26 | if ($a <> '.' && $a <> '/') { |
| 27 | - $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep; |
|
| 27 | + $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep; |
|
| 28 | 28 | } |
| 29 | 29 | $rep = preg_replace(',(^\.\.\/),', '', $rep); |
| 30 | 30 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $p -= ($x * 1000); |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 80 | + return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -130,8 +130,8 @@ discard block |
||
| 130 | 130 | $src = ''; |
| 131 | 131 | } |
| 132 | 132 | if ($script) { |
| 133 | - $script = ("/*<![CDATA[*/\n" . |
|
| 134 | - preg_replace(',</([^>]*)>,', '<\/\1>', $script) . |
|
| 133 | + $script = ("/*<![CDATA[*/\n". |
|
| 134 | + preg_replace(',</([^>]*)>,', '<\/\1>', $script). |
|
| 135 | 135 | '/*]]>*/'); |
| 136 | 136 | } |
| 137 | 137 | if ($noscript) { |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | foreach ($cookies_masques as $k) { |
| 218 | 218 | if (!empty($_COOKIE[$k])) { |
| 219 | 219 | $cookies_backup[$k] = $_COOKIE[$k]; |
| 220 | - $_SERVER['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []); |
|
| 221 | - $_ENV['HTTP_COOKIE'] = str_replace("$k=" . $_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []); |
|
| 220 | + $_SERVER['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_SERVER['HTTP_COOKIE'] ?? []); |
|
| 221 | + $_ENV['HTTP_COOKIE'] = str_replace("$k=".$_COOKIE[$k], "$k=$mask", $_ENV['HTTP_COOKIE'] ?? []); |
|
| 222 | 222 | $_COOKIE[$k] = $mask; |
| 223 | 223 | } |
| 224 | 224 | } |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | if ($path_base == null) { |
| 39 | 39 | // Chemin standard depuis l'espace public |
| 40 | 40 | $path = defined('_SPIP_PATH') ? _SPIP_PATH : |
| 41 | - _DIR_RACINE . ':' . |
|
| 42 | - _DIR_RACINE . 'squelettes-dist/:' . |
|
| 43 | - _DIR_RACINE . 'prive/:' . |
|
| 41 | + _DIR_RACINE.':'. |
|
| 42 | + _DIR_RACINE.'squelettes-dist/:'. |
|
| 43 | + _DIR_RACINE.'prive/:'. |
|
| 44 | 44 | _DIR_RESTREINT; |
| 45 | 45 | // Ajouter squelettes/ |
| 46 | - if (@is_dir(_DIR_RACINE . 'squelettes')) { |
|
| 47 | - $path = _DIR_RACINE . 'squelettes/:' . $path; |
|
| 46 | + if (@is_dir(_DIR_RACINE.'squelettes')) { |
|
| 47 | + $path = _DIR_RACINE.'squelettes/:'.$path; |
|
| 48 | 48 | } |
| 49 | 49 | foreach (explode(':', $path) as $dir) { |
| 50 | 50 | if (strlen($dir) && !str_ends_with($dir, '/')) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | // Et le(s) dossier(s) des squelettes nommes |
| 57 | 57 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 58 | 58 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 59 | - array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/'); |
|
| 59 | + array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/'); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | $GLOBALS['path_sig'] = md5(serialize($path_full)); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | if (is_array($dir_path) || strlen($dir_path)) { |
| 69 | 69 | $tete = ''; |
| 70 | - if (reset($path_base) == _DIR_RACINE . 'squelettes/') { |
|
| 70 | + if (reset($path_base) == _DIR_RACINE.'squelettes/') { |
|
| 71 | 71 | $tete = array_shift($path_base); |
| 72 | 72 | } |
| 73 | 73 | $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path)); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | // Et le(s) dossier(s) des squelettes nommes |
| 89 | 89 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 90 | 90 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 91 | - array_unshift($path_full, ((isset($d[0]) && $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/'); |
|
| 91 | + array_unshift($path_full, ((isset($d[0]) && $d[0] == '/') ? '' : _DIR_RACINE).$d.'/'); |
|
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | 94 | |
@@ -164,14 +164,14 @@ discard block |
||
| 164 | 164 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 165 | 165 | if ( |
| 166 | 166 | preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m) |
| 167 | - && ($file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg') |
|
| 167 | + && ($file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg') |
|
| 168 | 168 | && ($f = find_in_theme("$file_svg_generique")) |
| 169 | 169 | ) { |
| 170 | - if (($fsize = substr($f, 0, -6) . $m[1] . '.svg') && file_exists($fsize)) { |
|
| 170 | + if (($fsize = substr($f, 0, -6).$m[1].'.svg') && file_exists($fsize)) { |
|
| 171 | 171 | return $themefiles["$subdir$file"] = $fsize; |
| 172 | 172 | } |
| 173 | 173 | else { |
| 174 | - return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px'; |
|
| 174 | + return $themefiles["$subdir$file"] = "$f?".$m[1].'px'; |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | return $themefiles["$subdir$file"] = $f; |
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | - spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme'); |
|
| 184 | + spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme'); |
|
| 185 | 185 | |
| 186 | 186 | return $themefiles["$subdir$file"] = ''; |
| 187 | 187 | } |
@@ -282,8 +282,8 @@ discard block |
||
| 282 | 282 | return false; |
| 283 | 283 | } |
| 284 | 284 | if ($include && !isset($inc[$dirname][$file])) { |
| 285 | - include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 286 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 285 | + include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 286 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
@@ -296,14 +296,14 @@ discard block |
||
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | foreach (creer_chemin() as $dir) { |
| 299 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 300 | - $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a); |
|
| 299 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 300 | + $dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a); |
|
| 301 | 301 | } |
| 302 | 302 | if ($dirs[$a]) { |
| 303 | - if (file_exists(_ROOT_CWD . ($a .= $file))) { |
|
| 303 | + if (file_exists(_ROOT_CWD.($a .= $file))) { |
|
| 304 | 304 | if ($include && !isset($inc[$dirname][$file])) { |
| 305 | - include_once _ROOT_CWD . $a; |
|
| 306 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 305 | + include_once _ROOT_CWD.$a; |
|
| 306 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 307 | 307 | } |
| 308 | 308 | if (!defined('_SAUVER_CHEMIN')) { |
| 309 | 309 | // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | define('_SAUVER_CHEMIN', true); |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a; |
|
| 316 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a; |
|
| 317 | 317 | } |
| 318 | 318 | } |
| 319 | 319 | } |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | define('_SAUVER_CHEMIN', true); |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false; |
|
| 342 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false; |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | function clear_path_cache() { |
@@ -408,12 +408,12 @@ discard block |
||
| 408 | 408 | // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue |
| 409 | 409 | // on a pas encore inclus flock.php |
| 410 | 410 | if (!function_exists('preg_files')) { |
| 411 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 411 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | // Parcourir le chemin |
| 415 | 415 | foreach (creer_chemin() as $d) { |
| 416 | - $f = $d . $dir; |
|
| 416 | + $f = $d.$dir; |
|
| 417 | 417 | if (@is_dir($f)) { |
| 418 | 418 | $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs); |
| 419 | 419 | foreach ($liste as $chemin) { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($taches && count($taches) && !spip_connect()) { |
| 42 | 42 | return false; |
| 43 | 43 | } |
| 44 | - spip_log('cron !', 'jq' . _LOG_DEBUG); |
|
| 44 | + spip_log('cron !', 'jq'._LOG_DEBUG); |
|
| 45 | 45 | if ($genie = charger_fonction('genie', 'inc', true)) { |
| 46 | 46 | return $genie($taches); |
| 47 | 47 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | if ($queue_next_job_time == -1) { |
| 146 | 146 | if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) { |
| 147 | - define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt'); |
|
| 147 | + define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt'); |
|
| 148 | 148 | } |
| 149 | 149 | // utiliser un cache memoire si dispo |
| 150 | 150 | if (function_exists('cache_get') && defined('_MEMOIZE_MEMORY') && _MEMOIZE_MEMORY) { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | function spip_log($message = null, $name = null) { |
| 44 | 44 | static $pre = []; |
| 45 | 45 | static $log; |
| 46 | - preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs); |
|
| 46 | + preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs); |
|
| 47 | 47 | if (!isset($regs[1]) || !$logname = $regs[1]) { |
| 48 | 48 | $logname = null; |
| 49 | 49 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if (!is_string($message)) { |
| 72 | 72 | $message = print_r($message, true); |
| 73 | 73 | } |
| 74 | - $log($pre[$niveau] . ' ' . $message, $logname); |
|
| 74 | + $log($pre[$niveau].' '.$message, $logname); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | foreach ($regexp as $r => $e) { |
| 86 | 86 | $regexp[$r] = str_replace('[]', '\[\]', preg_replace(',[^\w\d\[\]-],', '', $e)); |
| 87 | 87 | } |
| 88 | - $regexp = ',^(' . implode('|', $regexp) . '[[]?[]]?)(=.*)?$,'; |
|
| 88 | + $regexp = ',^('.implode('|', $regexp).'[[]?[]]?)(=.*)?$,'; |
|
| 89 | 89 | $ajouts = array_flip(explode('|', $c)); |
| 90 | 90 | $u = is_array($v) ? $v : rawurlencode((string) $v); |
| 91 | 91 | $testv = (is_array($v) ? count($v) : strlen((string) $v)); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | // Ajout. Pour une variable, remplacer au meme endroit, |
| 113 | 113 | // pour un tableau ce sera fait dans la prochaine boucle |
| 114 | 114 | elseif (!str_ends_with($r[1], '[]')) { |
| 115 | - $url[$n] = $r[1] . '=' . $u; |
|
| 115 | + $url[$n] = $r[1].'='.$u; |
|
| 116 | 116 | unset($ajouts[$r[1]]); |
| 117 | 117 | } |
| 118 | 118 | // Pour les tableaux on laisse tomber les valeurs de |
@@ -133,11 +133,11 @@ discard block |
||
| 133 | 133 | } elseif ($testv) { |
| 134 | 134 | foreach ($ajouts as $k => $n) { |
| 135 | 135 | if (!is_array($v)) { |
| 136 | - $url[] = $k . '=' . $u; |
|
| 136 | + $url[] = $k.'='.$u; |
|
| 137 | 137 | } else { |
| 138 | - $id = (str_ends_with($k, '[]')) ? $k : ($k . '[]'); |
|
| 138 | + $id = (str_ends_with($k, '[]')) ? $k : ($k.'[]'); |
|
| 139 | 139 | foreach ($v as $w) { |
| 140 | - $url[] = $id . '=' . (is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 140 | + $url[] = $id.'='.(is_array($w) ? 'Array' : rawurlencode($w)); |
|
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -148,10 +148,10 @@ discard block |
||
| 148 | 148 | |
| 149 | 149 | // recomposer l'adresse |
| 150 | 150 | if ($url) { |
| 151 | - $a .= '?' . join($sep, $url); |
|
| 151 | + $a .= '?'.join($sep, $url); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | - return $a . $ancre; |
|
| 154 | + return $a.$ancre; |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | translitteration($ancre) |
| 182 | 182 | ); |
| 183 | 183 | } |
| 184 | - return $url . (strlen($ancre) ? '#' . $ancre : ''); |
|
| 184 | + return $url.(strlen($ancre) ? '#'.$ancre : ''); |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | if (str_starts_with($var, '^')) { |
| 227 | 227 | $var = substr($var, 1); |
| 228 | 228 | } else { |
| 229 | - $var = '[^=&]*' . $var; |
|
| 229 | + $var = '[^=&]*'.$var; |
|
| 230 | 230 | } |
| 231 | 231 | if (str_ends_with($var, '$')) { |
| 232 | 232 | $var = substr($var, 0, -1); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $var .= '[^=&]*'; |
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | - $preg_nettoyer = ',([?&])(' . implode('|', $preg_nettoyer_vars) . ')=[^&]*(&|$),i'; |
|
| 237 | + $preg_nettoyer = ',([?&])('.implode('|', $preg_nettoyer_vars).')=[^&]*(&|$),i'; |
|
| 238 | 238 | } |
| 239 | 239 | if (empty($request_uri)) { |
| 240 | 240 | return $request_uri; |
@@ -364,7 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | // On a ete gentil mais la .... |
| 367 | - spip_log("generer_objet_url: entite $entite " . ($public ? "($f)" : '') . " inconnue $type $public $connect", _LOG_ERREUR); |
|
| 367 | + spip_log("generer_objet_url: entite $entite ".($public ? "($f)" : '')." inconnue $type $public $connect", _LOG_ERREUR); |
|
| 368 | 368 | |
| 369 | 369 | return ''; |
| 370 | 370 | } |
@@ -415,8 +415,8 @@ discard block |
||
| 415 | 415 | include_spip('base/connect_sql'); |
| 416 | 416 | $id_type = id_table_objet($entite, $public); |
| 417 | 417 | |
| 418 | - return _DIR_RACINE . get_spip_script('./') |
|
| 419 | - . '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public" |
|
| 418 | + return _DIR_RACINE.get_spip_script('./') |
|
| 419 | + . '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public" |
|
| 420 | 420 | . (!$args ? '' : "&$args") |
| 421 | 421 | . (!$ancre ? '' : "#$ancre"); |
| 422 | 422 | } |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | !empty($_SERVER['QUERY_STRING']) |
| 567 | 567 | && !str_contains($_SERVER['REQUEST_URI'], '?') |
| 568 | 568 | ) { |
| 569 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 569 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 570 | 570 | } |
| 571 | 571 | } |
| 572 | 572 | } |
@@ -604,9 +604,9 @@ discard block |
||
| 604 | 604 | array_shift($myself); |
| 605 | 605 | $myself = implode('/', $myself); |
| 606 | 606 | } |
| 607 | - $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/'; |
|
| 607 | + $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/'; |
|
| 608 | 608 | |
| 609 | - $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/'); |
|
| 609 | + $url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/'); |
|
| 610 | 610 | |
| 611 | 611 | return $url; |
| 612 | 612 | } |
@@ -645,16 +645,16 @@ discard block |
||
| 645 | 645 | function generer_url_ecrire(?string $script = '', $args = '', $no_entities = false, $rel = false) { |
| 646 | 646 | $script ??= ''; |
| 647 | 647 | if (!$rel) { |
| 648 | - $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT; |
|
| 648 | + $rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT; |
|
| 649 | 649 | } else { |
| 650 | 650 | if (!is_string($rel)) { |
| 651 | - $rel = _DIR_RESTREINT ?: './' . _SPIP_ECRIRE_SCRIPT; |
|
| 651 | + $rel = _DIR_RESTREINT ?: './'._SPIP_ECRIRE_SCRIPT; |
|
| 652 | 652 | } |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | [$script, $ancre] = array_pad(explode('#', $script), 2, null); |
| 656 | 656 | if ($script && ($script <> 'accueil' || $rel)) { |
| 657 | - $args = "?exec=$script" . (!$args ? '' : "&$args"); |
|
| 657 | + $args = "?exec=$script".(!$args ? '' : "&$args"); |
|
| 658 | 658 | } elseif ($args) { |
| 659 | 659 | $args = "?$args"; |
| 660 | 660 | } |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | $args .= "#$ancre"; |
| 663 | 663 | } |
| 664 | 664 | |
| 665 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 665 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | // |
@@ -744,10 +744,10 @@ discard block |
||
| 744 | 744 | $action = parametre_url($action, _SPIP_PAGE, $script, '&'); |
| 745 | 745 | } |
| 746 | 746 | if ($args) { |
| 747 | - $action .= (str_contains($action, '?') ? '&' : '?') . $args; |
|
| 747 | + $action .= (str_contains($action, '?') ? '&' : '?').$args; |
|
| 748 | 748 | } |
| 749 | 749 | // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide |
| 750 | - $url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 750 | + $url = ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | if (!$no_entities) { |
@@ -759,7 +759,7 @@ discard block |
||
| 759 | 759 | |
| 760 | 760 | function generer_url_prive($script, $args = '', $no_entities = false) { |
| 761 | 761 | |
| 762 | - return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php'); |
|
| 762 | + return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php'); |
|
| 763 | 763 | } |
| 764 | 764 | |
| 765 | 765 | |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | : generer_url_public('', '', false, false); |
| 788 | 788 | $url = parametre_url($url, 'action', $script); |
| 789 | 789 | if ($args) { |
| 790 | - $url .= quote_amp('&' . $args); |
|
| 790 | + $url .= quote_amp('&'.$args); |
|
| 791 | 791 | } |
| 792 | 792 | |
| 793 | 793 | if ($no_entities) { |
@@ -821,9 +821,9 @@ discard block |
||
| 821 | 821 | } |
| 822 | 822 | $url = |
| 823 | 823 | (($public ? _DIR_RACINE : _DIR_RESTREINT) ?: './') |
| 824 | - . $script . '/' |
|
| 824 | + . $script.'/' |
|
| 825 | 825 | . ($path ? trim($path, '/') : '') |
| 826 | - . ($args ? '?' . quote_amp($args) : ''); |
|
| 826 | + . ($args ? '?'.quote_amp($args) : ''); |
|
| 827 | 827 | |
| 828 | 828 | if ($no_entities) { |
| 829 | 829 | $url = str_replace('&', '&', $url); |
@@ -19,4 +19,4 @@ |
||
| 19 | 19 | return; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -include_once dirname(__DIR__) . '/bootstrap/functions.php'; |
|
| 22 | +include_once dirname(__DIR__).'/bootstrap/functions.php'; |
|