@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | $GLOBALS['contexte'] = calculer_contexte(); |
| 35 | 35 | $page = ['contexte_implicite' => calculer_contexte_implicite()]; |
| 36 | - $page['contexte_implicite']['cache'] = $fond . preg_replace( |
|
| 36 | + $page['contexte_implicite']['cache'] = $fond.preg_replace( |
|
| 37 | 37 | ',\.[a-zA-Z0-9]*$,', |
| 38 | 38 | '', |
| 39 | 39 | preg_replace('/[?].*$/', '', $GLOBALS['REQUEST_URI']) |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | if ($page === '') { |
| 134 | 134 | $erreur = _T( |
| 135 | 135 | 'info_erreur_squelette2', |
| 136 | - ['fichier' => spip_htmlspecialchars($fond) . '.' . _EXTENSION_SQUELETTES] |
|
| 136 | + ['fichier' => spip_htmlspecialchars($fond).'.'._EXTENSION_SQUELETTES] |
|
| 137 | 137 | ); |
| 138 | 138 | erreur_squelette($erreur); |
| 139 | 139 | // eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4 |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | if ( |
| 175 | 175 | $lastmodified && !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !isset($page['entetes']['Last-Modified']) |
| 176 | 176 | ) { |
| 177 | - $page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified) . ' GMT'; |
|
| 177 | + $page['entetes']['Last-Modified'] = gmdate('D, d M Y H:i:s', $lastmodified).' GMT'; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // fermer la connexion apres les headers si requete HEAD |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | if (!defined('_CONTEXTE_IGNORE_LISTE_VARIABLES')) { |
| 207 | 207 | nettoyer_uri_var(''); |
| 208 | 208 | } |
| 209 | - $preg_ignore_variables = '/(' . implode('|',_CONTEXTE_IGNORE_LISTE_VARIABLES) . ')/'; |
|
| 209 | + $preg_ignore_variables = '/('.implode('|', _CONTEXTE_IGNORE_LISTE_VARIABLES).')/'; |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | $contexte = []; |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | 'spip_version_code' => $GLOBALS['spip_version_code'], |
| 248 | 248 | ]; |
| 249 | 249 | if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
| 250 | - $contexte_implicite['host'] .= '|' . $_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 250 | + $contexte_implicite['host'] .= '|'.$_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | return $contexte_implicite; |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | } |
| 583 | 583 | } |
| 584 | 584 | if (is_null($id)) { |
| 585 | - $msg = "modeles/$modele : " . _T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]); |
|
| 585 | + $msg = "modeles/$modele : "._T('zbug_parametres_inclus_incorrects', ['param' => "id/$primary"]); |
|
| 586 | 586 | erreur_squelette($msg); |
| 587 | 587 | // on passe id=0 au routeur pour tomber sur le modele par defaut et eviter une seconde erreur sur un modele inexistant |
| 588 | 588 | $id = 0; |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | if (preg_match(',^[a-z0-9_]+$,', $soustype)) { |
| 628 | - if (!trouve_modele($fond = ($type . '_' . $soustype))) { |
|
| 628 | + if (!trouve_modele($fond = ($type.'_'.$soustype))) { |
|
| 629 | 629 | $fond = ''; |
| 630 | 630 | $class = $soustype; |
| 631 | 631 | } |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | $compteur--; |
| 641 | 641 | return false; |
| 642 | 642 | } |
| 643 | - $fond = 'modeles/' . $fond; |
|
| 643 | + $fond = 'modeles/'.$fond; |
|
| 644 | 644 | // Creer le contexte |
| 645 | 645 | $contexte = $env; |
| 646 | 646 | // securiser le contexte des modèles : tout ce qui arrive de _request() doit être sanitizé |
@@ -650,7 +650,7 @@ discard block |
||
| 650 | 650 | if (is_scalar($v)) { |
| 651 | 651 | $v = spip_securise_valeur_env_modele($v); |
| 652 | 652 | } else { |
| 653 | - array_walk_recursive($v, function (&$value, $index) { |
|
| 653 | + array_walk_recursive($v, function(&$value, $index) { |
|
| 654 | 654 | $value = spip_securise_valeur_env_modele($value); |
| 655 | 655 | }); |
| 656 | 656 | } |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | // sinon, s'il y a un lien, on l'ajoute classiquement |
| 696 | 696 | if ( |
| 697 | 697 | strstr( |
| 698 | - ' ' . ($classes = extraire_attribut($retour, 'class')) . ' ', |
|
| 698 | + ' '.($classes = extraire_attribut($retour, 'class')).' ', |
|
| 699 | 699 | 'spip_lien_ok' |
| 700 | 700 | ) |
| 701 | 701 | ) { |
@@ -706,7 +706,7 @@ discard block |
||
| 706 | 706 | ); |
| 707 | 707 | } else { |
| 708 | 708 | if ($lien) { |
| 709 | - $retour = '<a href="' . $lien['href'] . '" class="' . $lien['class'] . '">' . $retour . '</a>'; |
|
| 709 | + $retour = '<a href="'.$lien['href'].'" class="'.$lien['class'].'">'.$retour.'</a>'; |
|
| 710 | 710 | } |
| 711 | 711 | } |
| 712 | 712 | |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | if (is_numeric($valeur) || is_bool($valeur) || is_null($valeur)) { |
| 732 | 732 | return $valeur; |
| 733 | 733 | } |
| 734 | - $valeur = (string)$valeur; |
|
| 734 | + $valeur = (string) $valeur; |
|
| 735 | 735 | if (str_starts_with($valeur, '@') && is_numeric(substr($valeur, 1))) { |
| 736 | 736 | return $valeur; |
| 737 | 737 | } |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | return $page; |
| 752 | 752 | } |
| 753 | 753 | // eval $page et affecte $res |
| 754 | - include _ROOT_RESTREINT . 'public/evaluer_page.php'; |
|
| 754 | + include _ROOT_RESTREINT.'public/evaluer_page.php'; |
|
| 755 | 755 | |
| 756 | 756 | // Lever un drapeau (global) si le fond utilise #SESSION |
| 757 | 757 | // a destination de public/parametrer |
@@ -819,16 +819,16 @@ discard block |
||
| 819 | 819 | if (($pos = strpos($head, '<head>')) !== false) { |
| 820 | 820 | $head = substr_replace($head, $base, $pos + 6, 0); |
| 821 | 821 | } elseif (preg_match(',<head[^>]*>,i', $head, $r)) { |
| 822 | - $head = str_replace($r[0], $r[0] . $base, $head); |
|
| 822 | + $head = str_replace($r[0], $r[0].$base, $head); |
|
| 823 | 823 | } |
| 824 | - $texte = $head . substr($texte, $poshead); |
|
| 824 | + $texte = $head.substr($texte, $poshead); |
|
| 825 | 825 | } |
| 826 | 826 | if ($href_base) { |
| 827 | 827 | // gerer les ancres |
| 828 | 828 | $base = $_SERVER['REQUEST_URI']; |
| 829 | 829 | // pas de guillemets ni < dans l'URL qu'on insere dans le HTML |
| 830 | 830 | if (str_contains($base, "'") || str_contains($base, '"') || str_contains($base, '<')) { |
| 831 | - $base = str_replace(["'",'"','<'], ['%27','%22','%3C'], $base); |
|
| 831 | + $base = str_replace(["'", '"', '<'], ['%27', '%22', '%3C'], $base); |
|
| 832 | 832 | } |
| 833 | 833 | if (str_contains($texte, "href='#")) { |
| 834 | 834 | $texte = str_replace("href='#", "href='$base#", $texte); |