@@ -99,11 +99,11 @@ |
||
| 99 | 99 | $GLOBALS['_INC_PUBLIC']++; |
| 100 | 100 | |
| 101 | 101 | // fix #4235 |
| 102 | - $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 102 | + $cache_utilise_session_appelant = ($GLOBALS['cache_utilise_session'] ?? null); |
|
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | foreach (is_array($fond) ? $fond : [$fond] as $f) { |
| 106 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 106 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 107 | 107 | |
| 108 | 108 | $page = evaluer_fond($f, $contexte, $connect); |
| 109 | 109 | if ($page === '') { |
@@ -32,8 +32,7 @@ discard block |
||
| 32 | 32 | . "><div>\n" |
| 33 | 33 | . "<input type='hidden' name='exec' value='$script1' />" |
| 34 | 34 | . $corps |
| 35 | - . (!$submit ? '' : |
|
| 36 | - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>')) |
|
| 35 | + . (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>')) |
|
| 37 | 36 | . "</div></form>\n"; |
| 38 | 37 | } |
| 39 | 38 | |
@@ -58,13 +57,13 @@ discard block |
||
| 58 | 57 | ? generer_url_ecrire(_request('exec')) |
| 59 | 58 | : generer_url_public(); |
| 60 | 59 | |
| 61 | - return "\n<form action='" . |
|
| 62 | - $h . |
|
| 63 | - "'" . |
|
| 64 | - $atts . |
|
| 65 | - ">\n" . |
|
| 66 | - '<div>' . |
|
| 67 | - "\n<input type='hidden' name='action' value='$script' />" . |
|
| 68 | - $corps . |
|
| 60 | + return "\n<form action='". |
|
| 61 | + $h. |
|
| 62 | + "'". |
|
| 63 | + $atts. |
|
| 64 | + ">\n". |
|
| 65 | + '<div>'. |
|
| 66 | + "\n<input type='hidden' name='action' value='$script' />". |
|
| 67 | + $corps. |
|
| 69 | 68 | '</div></form>'; |
| 70 | 69 | } |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | **/ |
| 45 | 45 | function verifier_visiteur() { |
| 46 | 46 | @spip_initialisation_core( |
| 47 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 48 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 49 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 50 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 47 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 48 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 49 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 50 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | 53 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $h = (isset($_SERVER['PHP_AUTH_USER']) && !$GLOBALS['ignore_auth_http']); |
| 83 | - if ($h || isset($_COOKIE['spip_session']) || isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 83 | + if ($h || isset($_COOKIE['spip_session']) || isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 84 | 84 | $session = charger_fonction('session', 'inc'); |
| 85 | 85 | if ($session()) { |
| 86 | 86 | return $GLOBALS['visiteur_session']['statut']; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | if (!empty($GLOBALS['visiteur_session'])) { |
| 125 | 125 | include_spip('inc/session'); |
| 126 | 126 | $cookie = lire_cookie_session(); |
| 127 | - $s = serialize($GLOBALS['visiteur_session']) . '_' . ($cookie ?: ''); |
|
| 127 | + $s = serialize($GLOBALS['visiteur_session']).'_'.($cookie ?: ''); |
|
| 128 | 128 | } |
| 129 | 129 | $s = pipeline('definir_session', $s); |
| 130 | 130 | $session = ($s ? substr(md5($s), 0, 8) : ''); |
@@ -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 | } |
@@ -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'; |
|
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../'); |
| 27 | 27 | |
| 28 | 28 | /** chemin absolu vers la racine */ |
| 29 | -define('_ROOT_RACINE', dirname(__DIR__, 3) . DIRECTORY_SEPARATOR); |
|
| 29 | +define('_ROOT_RACINE', dirname(__DIR__, 3).DIRECTORY_SEPARATOR); |
|
| 30 | 30 | /** chemin absolu vers le repertoire de travail */ |
| 31 | -define('_ROOT_CWD', getcwd() . DIRECTORY_SEPARATOR); |
|
| 31 | +define('_ROOT_CWD', getcwd().DIRECTORY_SEPARATOR); |
|
| 32 | 32 | /** chemin absolu vers ecrire */ |
| 33 | -define('_ROOT_RESTREINT', _ROOT_CWD . _DIR_RESTREINT); |
|
| 33 | +define('_ROOT_RESTREINT', _ROOT_CWD._DIR_RESTREINT); |
|
| 34 | 34 | |
| 35 | 35 | # Le nom des 4 repertoires modifiables par les scripts lances par httpd |
| 36 | 36 | # Par defaut ces 4 noms seront suffixes par _DIR_RACINE (cf plus bas) |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | define('_NOM_IMG_PACK', 'images/'); |
| 59 | 59 | } |
| 60 | 60 | /** le chemin http (relatif) vers les images standard */ |
| 61 | -define('_DIR_IMG_PACK', (_DIR_RACINE . 'prive/' . _NOM_IMG_PACK)); |
|
| 61 | +define('_DIR_IMG_PACK', (_DIR_RACINE.'prive/'._NOM_IMG_PACK)); |
|
| 62 | 62 | |
| 63 | 63 | /** le chemin php (absolu) vers les images standard (pour hebergement centralise) */ |
| 64 | -define('_ROOT_IMG_PACK', dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'prive' . DIRECTORY_SEPARATOR . _NOM_IMG_PACK); |
|
| 64 | +define('_ROOT_IMG_PACK', dirname(__DIR__, 3).DIRECTORY_SEPARATOR.'prive'.DIRECTORY_SEPARATOR._NOM_IMG_PACK); |
|
| 65 | 65 | |
| 66 | 66 | if (!defined('_JAVASCRIPT')) { |
| 67 | 67 | /** Nom du repertoire des bibliotheques JavaScript */ |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** le nom du repertoire des bibliotheques JavaScript du prive */ |
| 73 | -define('_DIR_JAVASCRIPT', (_DIR_RACINE . 'prive/' . _JAVASCRIPT)); |
|
| 73 | +define('_DIR_JAVASCRIPT', (_DIR_RACINE.'prive/'._JAVASCRIPT)); |
|
| 74 | 74 | |
| 75 | 75 | /** Le nom du fichier de personnalisation */ |
| 76 | 76 | if (!defined('_NOM_CONFIG')) { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | // Son emplacement absolu si on le trouve |
| 81 | -if (@file_exists($f = _ROOT_RACINE . _NOM_PERMANENTS_INACCESSIBLES . _NOM_CONFIG . '.php')) { |
|
| 81 | +if (@file_exists($f = _ROOT_RACINE._NOM_PERMANENTS_INACCESSIBLES._NOM_CONFIG.'.php')) { |
|
| 82 | 82 | /** Emplacement absolu du fichier d'option */ |
| 83 | 83 | define('_FILE_OPTIONS', $f); |
| 84 | 84 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $n = 0; |
| 45 | 45 | $time = $GLOBALS['meta']['cache_mark'] ?? 0; |
| 46 | 46 | for ($i = 0; $i < 256; $i++) { |
| 47 | - $dir = _DIR_CACHE . sprintf('%02s', dechex($i)); |
|
| 47 | + $dir = _DIR_CACHE.sprintf('%02s', dechex($i)); |
|
| 48 | 48 | if (@is_dir($dir) && is_readable($dir) && ($d = opendir($dir))) { |
| 49 | 49 | while (($f = readdir($d)) !== false) { |
| 50 | 50 | if (preg_match(',^[[0-9a-f]+\.cache$,S', $f) && ($a = stat("$dir/$f"))) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | // stocker la date_modif_$objet (ne sert a rien pour le moment) |
| 103 | 103 | if (isset($objet)) { |
| 104 | - ecrire_meta('derniere_modif_' . $objet, time()); |
|
| 104 | + ecrire_meta('derniere_modif_'.$objet, time()); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | // si $derniere_modif_invalide est un array('article', 'rubrique') |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | // sur certains sites on veut absolument garder certains caches référencés dans un CDN |
| 146 | 146 | // on peut donc inhiber la purge de ces répertoires pour eviter tout probleme |
| 147 | - if (file_exists(rtrim($dir, '/') . '/inhib_purger_repertoire.txt')) { |
|
| 147 | + if (file_exists(rtrim($dir, '/').'/inhib_purger_repertoire.txt')) { |
|
| 148 | 148 | return 0; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $row = sql_fetsel( |
| 109 | 109 | 'statut, id_auteur, login, email', |
| 110 | 110 | 'spip_auteurs', |
| 111 | - 'email=' . sql_quote($declaration['email']) |
|
| 111 | + 'email='.sql_quote($declaration['email']) |
|
| 112 | 112 | ) |
| 113 | 113 | ) { |
| 114 | 114 | if ($row['statut'] == '5poubelle' && empty($declaration['pass'])) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | - spip_logger()->info($row['id_auteur'] . ' veut se resinscrire'); |
|
| 127 | + spip_logger()->info($row['id_auteur'].' veut se resinscrire'); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return sql_fetsel( |
| 21 | 21 | '*', |
| 22 | 22 | 'spip_auteurs', |
| 23 | - ['id_auteur=' . (int) $id_auteur, "statut<>'5poubelle'", "pass<>''", "login<>''"] |
|
| 23 | + ['id_auteur='.(int) $id_auteur, "statut<>'5poubelle'", "pass<>''", "login<>''"] |
|
| 24 | 24 | ); |
| 25 | 25 | } elseif ($jeton) { |
| 26 | 26 | include_spip('action/inscrire_auteur'); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($auteur) { |
| 60 | 60 | $valeurs['id_auteur'] = $id_auteur; // a toutes fins utiles pour le formulaire |
| 61 | 61 | if ($jeton) { |
| 62 | - $valeurs['_hidden'] = '<input type="hidden" name="p" value="' . $jeton . '" />'; |
|
| 62 | + $valeurs['_hidden'] = '<input type="hidden" name="p" value="'.$jeton.'" />'; |
|
| 63 | 63 | } |
| 64 | 64 | } else { |
| 65 | 65 | $valeurs['message_erreur'] = _T('pass_erreur_code_inconnu'); |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | 'id_auteur', |
| 151 | 151 | 'spip_auteurs', |
| 152 | 152 | [ |
| 153 | - '(email=' . sql_quote($row['email']) . ' or login=' . sql_quote($row['email']) . ')', |
|
| 154 | - 'id_auteur != ' . $id_auteur |
|
| 153 | + '(email='.sql_quote($row['email']).' or login='.sql_quote($row['email']).')', |
|
| 154 | + 'id_auteur != '.$id_auteur |
|
| 155 | 155 | ], |
| 156 | 156 | '', |
| 157 | 157 | '', |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | else { |
| 165 | 165 | $identifiant = $row['login']; |
| 166 | 166 | } |
| 167 | - $res['message_ok'] = '<b>' . _T('pass_nouveau_enregistre') . '</b>' . |
|
| 168 | - '<br />' . _T('pass_rappel_login', ['login' => $identifiant]); |
|
| 167 | + $res['message_ok'] = '<b>'._T('pass_nouveau_enregistre').'</b>'. |
|
| 168 | + '<br />'._T('pass_rappel_login', ['login' => $identifiant]); |
|
| 169 | 169 | |
| 170 | 170 | include_spip('inc/auth'); |
| 171 | 171 | $auth = auth_identifier_login($row['login'], $oubli); |
| 172 | 172 | if (!is_array($auth)) { |
| 173 | - spip_logger()->error('Erreur identification ' . $row['login'] . " après changement de mot de passe: $auth"); |
|
| 173 | + spip_logger()->error('Erreur identification '.$row['login']." après changement de mot de passe: $auth"); |
|
| 174 | 174 | } |
| 175 | 175 | elseif ($auth['id_auteur'] == $id_auteur) { |
| 176 | 176 | auth_loger($auth); |