@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $headers = ''; |
| 51 | 51 | if (isset($page['entetes']) && (is_countable($page['entetes']) ? count($page['entetes']) : 0)) { |
| 52 | 52 | foreach ($page['entetes'] as $k => $v) { |
| 53 | - $headers .= (strlen((string) $v) ? "$k: $v" : $k) . "\n"; |
|
| 53 | + $headers .= (strlen((string) $v) ? "$k: $v" : $k)."\n"; |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | if (!defined('_DIR_RESTREINT_ABS')) { |
| 30 | 30 | if ( |
| 31 | 31 | defined('_DIR_RESTREINT') |
| 32 | - && @file_exists(_ROOT_RESTREINT . 'inc_version.php') |
|
| 32 | + && @file_exists(_ROOT_RESTREINT.'inc_version.php') |
|
| 33 | 33 | ) { |
| 34 | - include_once _ROOT_RESTREINT . 'inc_version.php'; |
|
| 34 | + include_once _ROOT_RESTREINT.'inc_version.php'; |
|
| 35 | 35 | } else { |
| 36 | 36 | die('inc_version absent ?'); |
| 37 | 37 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | } // fond demande dans l'url par page=xxxx ? |
| 43 | 43 | else { |
| 44 | 44 | if (isset($_GET[_SPIP_PAGE])) { |
| 45 | - $fond = (string)$_GET[_SPIP_PAGE]; |
|
| 45 | + $fond = (string) $_GET[_SPIP_PAGE]; |
|
| 46 | 46 | |
| 47 | 47 | // Securite |
| 48 | 48 | if ( |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | // lancer les taches sur affichage final, comme le cron |
| 102 | 102 | // mais sans rien afficher |
| 103 | 103 | $GLOBALS['html'] = false; // ne rien afficher |
| 104 | - pipeline('affichage_final' . _PIPELINE_SUFFIX, ''); |
|
| 104 | + pipeline('affichage_final'._PIPELINE_SUFFIX, ''); |
|
| 105 | 105 | exit; // le hit est fini ! |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | // Content-Type ? |
| 119 | 119 | if (!isset($page['entetes']['Content-Type'])) { |
| 120 | 120 | $charset = $GLOBALS['meta']['charset'] ?? 'utf-8'; |
| 121 | - $page['entetes']['Content-Type'] = 'text/html; charset=' . $charset; |
|
| 121 | + $page['entetes']['Content-Type'] = 'text/html; charset='.$charset; |
|
| 122 | 122 | $html = true; |
| 123 | 123 | } else { |
| 124 | 124 | $html = preg_match(',^\s*text/html,', (string) $page['entetes']['Content-Type']); |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | // traitements sur les entetes avant envoi |
| 146 | 146 | // peut servir pour le plugin de stats |
| 147 | - $page['entetes'] = pipeline('affichage_entetes_final' . _PIPELINE_SUFFIX, $page['entetes']); |
|
| 147 | + $page['entetes'] = pipeline('affichage_entetes_final'._PIPELINE_SUFFIX, $page['entetes']); |
|
| 148 | 148 | |
| 149 | 149 | |
| 150 | 150 | // eval $page et affecte $res |
| 151 | - include _ROOT_RESTREINT . 'public/evaluer_page.php'; |
|
| 151 | + include _ROOT_RESTREINT.'public/evaluer_page.php'; |
|
| 152 | 152 | envoyer_entetes($page['entetes']); |
| 153 | 153 | if ($res === false) { |
| 154 | 154 | include_spip('inc/autoriser'); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | // |
| 168 | 168 | // (c'est ici qu'on fait var_recherche, validation, boutons d'admin, |
| 169 | 169 | // cf. public/assembler.php) |
| 170 | - echo pipeline('affichage_final' . _PIPELINE_SUFFIX, $page['texte']); |
|
| 170 | + echo pipeline('affichage_final'._PIPELINE_SUFFIX, $page['texte']); |
|
| 171 | 171 | |
| 172 | 172 | if ($lang) { |
| 173 | 173 | lang_select(); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if ($html && ($affiche_boutons_admin || $debug)) { |
| 184 | 184 | $var_mode_affiche = _request('var_mode_affiche'); |
| 185 | 185 | $var_mode_objet = _request('var_mode_objet'); |
| 186 | - $GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet . 'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : ''); |
|
| 186 | + $GLOBALS['debug_objets'][$var_mode_affiche][$var_mode_objet.'tout'] = ($var_mode_affiche == 'validation' ? $page['texte'] : ''); |
|
| 187 | 187 | echo erreur_squelette(false); |
| 188 | 188 | } |
| 189 | 189 | } else { |
@@ -311,7 +311,7 @@ |
||
| 311 | 311 | foreach ($erreurs as $k => $v) { |
| 312 | 312 | if (is_string($v) && strlen(trim($v)) && !str_starts_with((string) $k, '_')) { |
| 313 | 313 | // on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form |
| 314 | - $valeurs['erreurs'][$k] = "<span role='alert'>" . $erreurs[$k] . '</span>'; |
|
| 314 | + $valeurs['erreurs'][$k] = "<span role='alert'>".$erreurs[$k].'</span>'; |
|
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | } |
@@ -53,12 +53,12 @@ |
||
| 53 | 53 | $_params = '['; |
| 54 | 54 | $nb_params = is_countable($p->param[0]) ? count($p->param[0]) : 0; // 1ère valeur vide donc 1 en plus |
| 55 | 55 | for ($i = 3; $i < $nb_params; $i++) { |
| 56 | - $_params .= interprete_argument_balise($i, $p) . ','; |
|
| 56 | + $_params .= interprete_argument_balise($i, $p).','; |
|
| 57 | 57 | } |
| 58 | 58 | $_params .= ']'; |
| 59 | 59 | |
| 60 | 60 | $info_sql = strtolower(substr((string) $info, 5)); |
| 61 | - $code = "generer_objet_info($id_objet, $type_objet, '$info_sql', " . ($p->etoile ? _q($p->etoile) : "''") . ", $_params)"; |
|
| 61 | + $code = "generer_objet_info($id_objet, $type_objet, '$info_sql', ".($p->etoile ? _q($p->etoile) : "''").", $_params)"; |
|
| 62 | 62 | $p->code = champ_sql($info, $p, $code); |
| 63 | 63 | $p->interdire_scripts = true; |
| 64 | 64 | |
@@ -72,5 +72,5 @@ |
||
| 72 | 72 | return ''; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - return generer_url_action('logout', 'logout=public&url=' . rawurlencode((string) ($cible ?: self('&')))); |
|
| 75 | + return generer_url_action('logout', 'logout=public&url='.rawurlencode((string) ($cible ?: self('&')))); |
|
| 76 | 76 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | if ($fichier) { |
| 110 | 110 | $code = "quete_logo_file($doc, $qconnect)"; |
| 111 | 111 | } else { |
| 112 | - $code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 112 | + $code = "quete_logo_document($doc, ".($lien ?: "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 113 | 113 | } |
| 114 | 114 | // (x=non-faux ? y : '') pour affecter x en retournant y |
| 115 | 115 | if ($p->descr['documents']) { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0} |
| 134 | 134 | if ($coord_x || $coord_y) { |
| 135 | - $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))"; |
|
| 135 | + $code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))"; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | $p->code = $code; |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | include_spip('inc/lang'); |
| 100 | 100 | |
| 101 | 101 | if ($GLOBALS['spip_lang'] != $default) { |
| 102 | - $opt = lang_select($default); # et remplace |
|
| 102 | + $opt = lang_select($default); # et remplace |
|
| 103 | 103 | if ($GLOBALS['spip_lang'] != $default) { |
| 104 | - $default = ''; # annule tout choix par defaut |
|
| 104 | + $default = ''; # annule tout choix par defaut |
|
| 105 | 105 | if ($opt) { |
| 106 | 106 | lang_select(); |
| 107 | 107 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | # lien a partir de / |
| 112 | 112 | $cible = parametre_url(self(), 'lang', '', '&'); |
| 113 | - $post = generer_url_action('converser', 'redirect=' . rawurlencode((string) $cible), true); |
|
| 113 | + $post = generer_url_action('converser', 'redirect='.rawurlencode((string) $cible), true); |
|
| 114 | 114 | |
| 115 | 115 | return [ |
| 116 | 116 | 'formulaires/menu_lang', |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | return ''; |
| 100 | 100 | } |
| 101 | 101 | foreach ($debug['sourcefile'] as $k => $v) { |
| 102 | - if (str_contains((string) $v, 'administration.') && isset($debug['resultat'][$k . 'tout'])) { |
|
| 103 | - return $debug['resultat'][$k . 'tout']; |
|
| 102 | + if (str_contains((string) $v, 'administration.') && isset($debug['resultat'][$k.'tout'])) { |
|
| 103 | + return $debug['resultat'][$k.'tout']; |
|
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
@@ -177,12 +177,12 @@ discard block |
||
| 177 | 177 | && ($id = (int) $id) |
| 178 | 178 | && ($desc = $trouver_table(table_objet_sql($type))) |
| 179 | 179 | ) { |
| 180 | - $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . (int) $id); |
|
| 180 | + $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".(int) $id); |
|
| 181 | 181 | if ($id) { |
| 182 | 182 | $env[$_id_type] = $id; |
| 183 | 183 | $env['objet'] = $type; |
| 184 | 184 | $env['id_objet'] = $id; |
| 185 | - $env['voir_' . $obj] = str_replace('&', '&', (string) generer_objet_url($id, $obj, '', '', false)); |
|
| 185 | + $env['voir_'.$obj] = str_replace('&', '&', (string) generer_objet_url($id, $obj, '', '', false)); |
|
| 186 | 186 | if ( |
| 187 | 187 | isset($desc['field']['id_rubrique']) |
| 188 | 188 | && $type != 'rubrique' |
@@ -235,10 +235,10 @@ discard block |
||
| 235 | 235 | $notpub = sql_in('statut', ['prop', 'prive']); |
| 236 | 236 | |
| 237 | 237 | if ($type == 'article' && $GLOBALS['meta']['post_dates'] != 'oui') { |
| 238 | - $notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ')'; |
|
| 238 | + $notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).')'; |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | - return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . '=' . $id . " AND ($notpub)"); |
|
| 241 | + return sql_fetsel('1', table_objet_sql($type), id_table_objet($type).'='.$id." AND ($notpub)"); |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | |
@@ -252,9 +252,9 @@ discard block |
||
| 252 | 252 | $alang = ''; |
| 253 | 253 | if (!empty($_COOKIE['spip_admin'])) { |
| 254 | 254 | $email_or_login = preg_replace(',^@,', '', (string) $_COOKIE['spip_admin']); |
| 255 | - $alang = sql_getfetsel('lang', 'spip_auteurs', 'email=' . sql_quote($email_or_login)); |
|
| 255 | + $alang = sql_getfetsel('lang', 'spip_auteurs', 'email='.sql_quote($email_or_login)); |
|
| 256 | 256 | if (!$alang) { |
| 257 | - $alang = sql_getfetsel('lang', 'spip_auteurs', 'login=' . sql_quote($email_or_login)); |
|
| 257 | + $alang = sql_getfetsel('lang', 'spip_auteurs', 'login='.sql_quote($email_or_login)); |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | if (!$alang) { |
@@ -279,9 +279,8 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | return ((!isset($GLOBALS['xhtml']) || $GLOBALS['xhtml'] !== 'true') ? |
| 281 | 281 | (parametre_url(self(), 'var_mode', 'debug', '&') |
| 282 | - . '&var_mode_affiche=validation') : |
|
| 283 | - ('http://validator.w3.org/check?uri=' |
|
| 284 | - . rawurlencode('http://' . $_SERVER['HTTP_HOST'] . nettoyer_uri()))); |
|
| 282 | + . '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri=' |
|
| 283 | + . rawurlencode('http://'.$_SERVER['HTTP_HOST'].nettoyer_uri()))); |
|
| 285 | 284 | } |
| 286 | 285 | |
| 287 | 286 | /** |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass]; |
| 68 | 68 | |
| 69 | 69 | // Si l'utilisateur figure deja dans la base, y recuperer les infos |
| 70 | - $r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur); |
|
| 70 | + $r = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login)." AND source='ldap'", '', '', '', '', $serveur); |
|
| 71 | 71 | |
| 72 | 72 | if ($r) { |
| 73 | 73 | return array_merge($r, $credentials_ldap); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | if ($r) { |
| 91 | 91 | return array_merge( |
| 92 | 92 | $credentials_ldap, |
| 93 | - sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . (int) $r, '', '', '', '', $serveur) |
|
| 93 | + sql_fetsel('*', 'spip_auteurs', 'id_auteur='.(int) $r, '', '', '', '', $serveur) |
|
| 94 | 94 | ); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $connexion = spip_connect($serveur); |
| 120 | 120 | if (!is_array($connexion['ldap'])) { |
| 121 | 121 | if ($connexion['authentification']['ldap']) { |
| 122 | - $f = _DIR_CONNECT . $connexion['authentification']['ldap']; |
|
| 122 | + $f = _DIR_CONNECT.$connexion['authentification']['ldap']; |
|
| 123 | 123 | unset($GLOBALS['ldap_link']); |
| 124 | 124 | if (is_readable($f)) { |
| 125 | 125 | include_once($f); |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | if (!ldap_bind($link, $dn, session_get('ldap_password'))) { |
| 333 | 333 | return false; |
| 334 | 334 | } |
| 335 | - $encoded_pass = '{MD5}' . base64_encode(pack('H*', md5((string) $new_pass))); |
|
| 335 | + $encoded_pass = '{MD5}'.base64_encode(pack('H*', md5((string) $new_pass))); |
|
| 336 | 336 | |
| 337 | 337 | return ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]); |
| 338 | 338 | } |