@@ -26,36 +26,36 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | function format_inclure_html($file, $args, $prof) { |
| 28 | 28 | if (!str_contains((string) $file, '#')) { |
| 29 | - $t = $file ? ('(' . $file . ')') : ''; |
|
| 29 | + $t = $file ? ('('.$file.')') : ''; |
|
| 30 | 30 | } else { |
| 31 | - $t = '{fond=' . $file . '}'; |
|
| 31 | + $t = '{fond='.$file.'}'; |
|
| 32 | 32 | } |
| 33 | - $args = $args ? '{' . implode(', ', $args) . '}' : (''); |
|
| 33 | + $args = $args ? '{'.implode(', ', $args).'}' : (''); |
|
| 34 | 34 | |
| 35 | - return ('<INCLURE' . $t . $args . '>'); |
|
| 35 | + return ('<INCLURE'.$t.$args.'>'); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | function format_polyglotte_html($args, $prof) { |
| 39 | 39 | $contenu = []; |
| 40 | 40 | foreach ($args as $l => $t) { |
| 41 | - $contenu[] = ($l ? "[$l]" : '') . $t; |
|
| 41 | + $contenu[] = ($l ? "[$l]" : '').$t; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - return ('<multi>' . implode(' ', $contenu) . '</multi>'); |
|
| 44 | + return ('<multi>'.implode(' ', $contenu).'</multi>'); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | function format_idiome_html($nom, $module, $args, $filtres, $prof) { |
| 48 | 48 | foreach ($args as $k => $v) { |
| 49 | 49 | $args[$k] = "$k=$v"; |
| 50 | 50 | } |
| 51 | - $args = ($args ? '{' . implode(',', $args) . '}' : ('')); |
|
| 51 | + $args = ($args ? '{'.implode(',', $args).'}' : ('')); |
|
| 52 | 52 | |
| 53 | - return ('<:' . ($module ? "$module:" : '') . $nom . $args . $filtres . ':>'); |
|
| 53 | + return ('<:'.($module ? "$module:" : '').$nom.$args.$filtres.':>'); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | function format_champ_html($nom, $boucle, $etoile, $avant, $apres, $args, $filtres, $prof) { |
| 57 | 57 | $nom = '#' |
| 58 | - . ($boucle ? ($boucle . ':') : '') |
|
| 58 | + . ($boucle ? ($boucle.':') : '') |
|
| 59 | 59 | . $nom |
| 60 | 60 | . $etoile |
| 61 | 61 | . $args |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | $critere[$k] = $crit_s; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - return ($critere ? '{' . implode(',', $critere) . '}' : ('')); |
|
| 87 | + return ($critere ? '{'.implode(',', $critere).'}' : ('')); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | function format_liste_html($fonc, $args, $prof) { |
| 91 | 91 | return ((($fonc !== '') ? "|$fonc" : $fonc) |
| 92 | - . ($args ? '{' . implode(',', $args) . '}' : (''))); |
|
| 92 | + . ($args ? '{'.implode(',', $args).'}' : (''))); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | // Concatenation sans separateur: verifier qu'on ne cree pas de faux lexemes |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | // si un texte se termine par ( et est suivi d'un champ |
| 107 | 107 | // ou assimiles, forcer la notation pleine |
| 108 | 108 | if ($c1 == '(' && str_starts_with((string) $texte2, '#')) { |
| 109 | - $args[$i + 1][0] = '[(' . $texte2 . ')]'; |
|
| 109 | + $args[$i + 1][0] = '[('.$texte2.')]'; |
|
| 110 | 110 | } |
| 111 | 111 | } else { |
| 112 | 112 | if ($type == 'texte') { |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $c1 == '}' && str_starts_with(ltrim((string) $texte2), '|') |
| 120 | 120 | || preg_match('/[\w\d_*]/', $c1) && preg_match('/^[\w\d_*{|]/', (string) $texte2) |
| 121 | 121 | ) { |
| 122 | - $args[$i][0] = '[(' . $texte . ')]'; |
|
| 122 | + $args[$i][0] = '[('.$texte.')]'; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * texte |
| 41 | 41 | */ |
| 42 | 42 | function sandbox_composer_texte($texte, &$p) { |
| 43 | - return "'" . str_replace(['\\', "'"], ['\\\\', "\\'"], $texte) . "'"; |
|
| 43 | + return "'".str_replace(['\\', "'"], ['\\\\', "\\'"], $texte)."'"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $min_f = $refl->getNumberOfRequiredParameters(); |
| 79 | 79 | if (($nb_args_f < $min_f)) { |
| 80 | 80 | $msg_args = ['filtre' => texte_script($fonc), 'nb' => $min_f - $nb_args_f]; |
| 81 | - erreur_squelette([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 81 | + erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | // le filtre n'existe pas, |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | function sandbox_filtrer_squelette($skel, $corps, $filtres) { |
| 161 | 161 | $series_filtres = func_get_args(); |
| 162 | - array_shift($series_filtres);// skel |
|
| 163 | - array_shift($series_filtres);// corps |
|
| 162 | + array_shift($series_filtres); // skel |
|
| 163 | + array_shift($series_filtres); // corps |
|
| 164 | 164 | |
| 165 | 165 | // proteger les <INCLUDE> et tous les morceaux de php licites |
| 166 | 166 | if ($skel['process_ins'] == 'php') { |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if (is_array($r)) { |
| 209 | 209 | $dst[] = $r[0]; |
| 210 | 210 | |
| 211 | - return $src[] = '___' . md5((string) $r[0]) . '___'; |
|
| 211 | + return $src[] = '___'.md5((string) $r[0]).'___'; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | // si on recoit pas un tableau, on renvoit les couples de substitution |
@@ -107,13 +107,13 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | function chrono_requete($temps) { |
| 109 | 109 | $total = 0; |
| 110 | - $hors = '<i>' . _T('zbug_hors_compilation') . '</i>'; |
|
| 110 | + $hors = '<i>'._T('zbug_hors_compilation').'</i>'; |
|
| 111 | 111 | $t = $q = $n = $d = []; |
| 112 | 112 | // Totaliser les temps et completer le Explain |
| 113 | 113 | foreach ($temps as $key => $v) { |
| 114 | 114 | [$dt, $nb, $boucle, $query, $explain, $res, $contexte] = $v; |
| 115 | 115 | if (is_array($contexte)) { |
| 116 | - $k = ($contexte[0] . " $boucle"); |
|
| 116 | + $k = ($contexte[0]." $boucle"); |
|
| 117 | 117 | include_spip('public/compiler'); |
| 118 | 118 | $env = reconstruire_contexte_compil($contexte); |
| 119 | 119 | } else { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Fabriquer les liens de navigations dans le tableau des temps |
| 159 | 159 | foreach ($temps as $k => $v) { |
| 160 | 160 | $titre = strip_tags((string) $v[2]); |
| 161 | - $href = quote_amp($GLOBALS['REQUEST_URI']) . "#req$i"; |
|
| 161 | + $href = quote_amp($GLOBALS['REQUEST_URI'])."#req$i"; |
|
| 162 | 162 | $href = str_replace("\\'", ''', $href); |
| 163 | 163 | |
| 164 | 164 | if (!isset($t[$v[2]])) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | unset($d['']); |
| 180 | 180 | // Fabriquer le tableau des liens de navigation dans le grand tableau |
| 181 | 181 | foreach ($d as $k => $v) { |
| 182 | - $d[$k] = $n[$k] . "</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 182 | + $d[$k] = $n[$k]."</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 183 | 183 | . implode('', $t[$k]); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | . implode("</td></tr>\n<tr><td>", $d) |
| 190 | 190 | . "</td></tr>\n" |
| 191 | 191 | . (# _request('var_mode_objet') ? '' : |
| 192 | - ('<tr><td>' . (is_countable($temps) ? count($temps) : 0) . '</td><td>' . _T('info_total') . '</td><td class="time">' . $total . '</td><td></td></tr>')) |
|
| 192 | + ('<tr><td>'.(is_countable($temps) ? count($temps) : 0).'</td><td>'._T('info_total').'</td><td class="time">'.$total.'</td><td></td></tr>')) |
|
| 193 | 193 | ]; |
| 194 | 194 | |
| 195 | 195 | return [$temps, $navigation]; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return sql_getfetsel( |
| 36 | 36 | 'virtuel', |
| 37 | 37 | 'spip_articles', |
| 38 | - ['id_article=' . (int) $id_article, "statut='publie'"], |
|
| 38 | + ['id_article='.(int) $id_article, "statut='publie'"], |
|
| 39 | 39 | '', |
| 40 | 40 | '', |
| 41 | 41 | '', |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $cache_quete[$connect][$table][$id] = sql_fetsel( |
| 79 | 79 | $cache_quete[$connect][$table]['_select'], |
| 80 | 80 | $table, |
| 81 | - $cache_quete[$connect][$table]['_id'] . '=' . (int) $id, |
|
| 81 | + $cache_quete[$connect][$table]['_id'].'='.(int) $id, |
|
| 82 | 82 | '', |
| 83 | 83 | '', |
| 84 | 84 | '', |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return |
| 170 | 170 | (isset($GLOBALS['meta']['date_prochain_postdate']) |
| 171 | 171 | && $GLOBALS['meta']['date_prochain_postdate'] > time()) |
| 172 | - ? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 172 | + ? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 173 | 173 | : '1=1'; |
| 174 | 174 | } |
| 175 | 175 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | && ($id_table = reset($objet)) |
| 229 | 229 | && ($objet = objet_type($id_table)) |
| 230 | 230 | ) { |
| 231 | - $w = "$mstatut<>" . sql_quote($v); |
|
| 231 | + $w = "$mstatut<>".sql_quote($v); |
|
| 232 | 232 | |
| 233 | 233 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 234 | 234 | // sinon l’auteur en session |
@@ -242,22 +242,22 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 245 | - if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) { |
|
| 245 | + if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) { |
|
| 246 | 246 | // si pas d'auteur identifie pas de sous-requete car pas d'article qui matche |
| 247 | 247 | if (!$id_auteur) { |
| 248 | 248 | $where[] = $w; |
| 249 | 249 | } else { |
| 250 | 250 | $primary = id_table_objet($objet); |
| 251 | - $where[] = "($w OR $id_table.$primary IN (" . sql_get_select( |
|
| 251 | + $where[] = "($w OR $id_table.$primary IN (".sql_get_select( |
|
| 252 | 252 | 'ssss.id_objet', |
| 253 | 253 | 'spip_auteurs_liens AS ssss', |
| 254 | - 'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . (int) $id_auteur, |
|
| 254 | + 'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.(int) $id_auteur, |
|
| 255 | 255 | '', |
| 256 | 256 | '', |
| 257 | 257 | '', |
| 258 | 258 | '', |
| 259 | 259 | $serveur |
| 260 | - ) . '))'; |
|
| 260 | + ).'))'; |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | } // ignorer ce statut si on ne sait pas comment le filtrer |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * @return array|bool|null |
| 296 | 296 | */ |
| 297 | 297 | function quete_fichier($id_document, $serveur = '') { |
| 298 | - return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . (int) $id_document), '', [], '', '', $serveur); |
|
| 298 | + return sql_getfetsel('fichier', 'spip_documents', ('id_document='.(int) $id_document), '', [], '', '', $serveur); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @return array|bool |
| 307 | 307 | */ |
| 308 | 308 | function quete_document($id_document, $serveur = '') { |
| 309 | - return sql_fetsel('*', 'spip_documents', ('id_document=' . (int) $id_document), '', [], '', '', $serveur); |
|
| 309 | + return sql_fetsel('*', 'spip_documents', ('id_document='.(int) $id_document), '', [], '', '', $serveur); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | /** |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * @return array|bool|null |
| 318 | 318 | */ |
| 319 | 319 | function quete_meta($nom, $serveur) { |
| 320 | - return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur); |
|
| 320 | + return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur); |
|
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | /** |
@@ -368,9 +368,9 @@ discard block |
||
| 368 | 368 | // qui permet de distinguer le changement de logo |
| 369 | 369 | // et placer un expire sur le dossier IMG/ |
| 370 | 370 | $res = [ |
| 371 | - $on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 372 | - ($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 373 | - ($taille ? ' ' . $taille[3] : ('')) |
|
| 371 | + $on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 372 | + ($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 373 | + ($taille ? ' '.$taille[3] : ('')) |
|
| 374 | 374 | ]; |
| 375 | 375 | $res['src'] = $res[0]; |
| 376 | 376 | $res['logo_on'] = $res[0]; |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | if ( |
| 481 | 481 | strcmp((string) $logo, (string) _DIR_PLUGINS) == 0 |
| 482 | 482 | || strcmp((string) $logo, (string) _DIR_PLUGINS_DIST) == 0 |
| 483 | - || strcmp((string) $logo, _DIR_RACINE . 'prive/') == 0 |
|
| 483 | + || strcmp((string) $logo, _DIR_RACINE.'prive/') == 0 |
|
| 484 | 484 | ) { |
| 485 | 485 | return $logo; |
| 486 | 486 | } |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | $exposer[$m][$type][$principal] = true; |
| 657 | 657 | if ($type == 'id_mot') { |
| 658 | 658 | if (!$parent) { |
| 659 | - $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . (int) $principal, '', '', '', '', $connect); |
|
| 659 | + $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.(int) $principal, '', '', '', '', $connect); |
|
| 660 | 660 | } |
| 661 | 661 | if ($parent) { |
| 662 | 662 | $exposer[$m]['id_groupe'][$parent] = true; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | function optimiser_caches_contextes() { |
| 52 | 52 | sous_repertoire(_DIR_CACHE, 'contextes'); |
| 53 | - if (is_dir($d = _DIR_CACHE . 'contextes')) { |
|
| 53 | + if (is_dir($d = _DIR_CACHE.'contextes')) { |
|
| 54 | 54 | include_spip('inc/invalideur'); |
| 55 | 55 | purger_repertoire($d, ['mtime' => time() - 48 * 3600, 'limit' => 10000]); |
| 56 | 56 | } |
@@ -95,16 +95,16 @@ discard block |
||
| 95 | 95 | $tables[] = array_shift($row); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - spip_log('optimiser_base_une_table ' . json_encode($tables, JSON_THROW_ON_ERROR), 'genie' . _LOG_DEBUG); |
|
| 98 | + spip_log('optimiser_base_une_table '.json_encode($tables, JSON_THROW_ON_ERROR), 'genie'._LOG_DEBUG); |
|
| 99 | 99 | if ($tables) { |
| 100 | 100 | $table_op = (int) (lire_config('optimiser_table', 0) + 1) % count($tables); |
| 101 | 101 | ecrire_config('optimiser_table', $table_op); |
| 102 | 102 | $q = $tables[$table_op]; |
| 103 | - spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG); |
|
| 103 | + spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie'._LOG_DEBUG); |
|
| 104 | 104 | if (sql_optimize($q)) { |
| 105 | - spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG); |
|
| 105 | + spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie'._LOG_DEBUG); |
|
| 106 | 106 | } else { |
| 107 | - spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG); |
|
| 107 | + spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie'._LOG_DEBUG); |
|
| 108 | 108 | } |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | sql_free($sel); |
| 140 | 140 | |
| 141 | 141 | if ($in) { |
| 142 | - sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : '')); |
|
| 143 | - spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG); |
|
| 142 | + sql_delete($table, sql_in($id, array_keys($in)).($and ? " AND $and" : '')); |
|
| 143 | + spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: ".implode(', ', array_keys($in)), 'genie'._LOG_DEBUG); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return count($in); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) { |
| 221 | 221 | define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600); |
| 222 | 222 | } |
| 223 | - sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - (int) _AUTEURS_DELAI_REJET_NOUVEAU))); |
|
| 223 | + sql_delete('spip_auteurs', "statut='nouveau' AND maj < ".sql_quote(date('Y-m-d', time() - (int) _AUTEURS_DELAI_REJET_NOUVEAU))); |
|
| 224 | 224 | |
| 225 | 225 | /** |
| 226 | 226 | * Permet aux plugins de compléter l'optimisation suite aux éléments disparus |
@@ -241,5 +241,5 @@ discard block |
||
| 241 | 241 | ]); |
| 242 | 242 | |
| 243 | 243 | |
| 244 | - spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG); |
|
| 244 | + spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie'._LOG_DEBUG); |
|
| 245 | 245 | } |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | function genie_mise_a_jour_dist($t) { |
| 29 | 29 | include_spip('inc/meta'); |
| 30 | 30 | $maj = info_maj($GLOBALS['spip_version_branche']); |
| 31 | - ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non'); |
|
| 31 | + ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non'); |
|
| 32 | 32 | |
| 33 | 33 | mise_a_jour_ecran_securite(); |
| 34 | 34 | |
| 35 | - spip_log('Verification version SPIP : ' . ($maj ?: 'version a jour'), 'verifie_maj'); |
|
| 35 | + spip_log('Verification version SPIP : '.($maj ?: 'version a jour'), 'verifie_maj'); |
|
| 36 | 36 | |
| 37 | 37 | return 1; |
| 38 | 38 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | // si l'ecran n'est pas deja present ou pas updatable, sortir |
| 58 | 58 | if ( |
| 59 | 59 | !_URL_ECRAN_SECURITE |
| 60 | - || !file_exists($filename = _DIR_ETC . 'ecran_securite.php') |
|
| 60 | + || !file_exists($filename = _DIR_ETC.'ecran_securite.php') |
|
| 61 | 61 | || !is_writable($filename) |
| 62 | 62 | || !($last_modified = filemtime($filename)) |
| 63 | 63 | || !($md5 = md5_file($filename)) |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | include_spip('inc/distant'); |
| 69 | - $tmp_file = _DIR_TMP . 'ecran_securite.php'; |
|
| 69 | + $tmp_file = _DIR_TMP.'ecran_securite.php'; |
|
| 70 | 70 | $url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5); |
| 71 | 71 | $url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']); |
| 72 | 72 | $res = recuperer_url($url, [ |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | include_once $tmp_file; |
| 86 | 86 | // ok, on le copie a la place de l'ecran existant |
| 87 | 87 | // en backupant l'ecran avant, au cas ou |
| 88 | - @copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified)); |
|
| 88 | + @copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified)); |
|
| 89 | 89 | @rename($tmp_file, $filename); |
| 90 | 90 | } else { |
| 91 | 91 | @unlink($tmp_file); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $message[] = _T('nouvelle_version_spip_majeure', ['version' => $maj['majeure']]); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="' . $maj['mineure'] . '">' . implode(' | ', $message) . '</a>'; |
|
| 130 | + return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="'.$maj['mineure'].'">'.implode(' | ', $message).'</a>'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | function info_maj_cache(): ?array { |
| 145 | 145 | $contenu = ''; |
| 146 | 146 | $options = []; |
| 147 | - $nom = _DIR_CACHE . _VERSIONS_LISTE; |
|
| 147 | + $nom = _DIR_CACHE._VERSIONS_LISTE; |
|
| 148 | 148 | if (file_exists($nom)) { |
| 149 | 149 | $contenu = file_get_contents($nom); |
| 150 | 150 | $options['if_modified_since'] = filemtime($nom); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | try { |
| 166 | 166 | $json = json_decode((string) $contenu, true, 512, JSON_THROW_ON_ERROR); |
| 167 | 167 | } catch (JsonException $e) { |
| 168 | - spip_log('Failed to parse Json data : ' . $e->getMessage(), 'verifie_maj'); |
|
| 168 | + spip_log('Failed to parse Json data : '.$e->getMessage(), 'verifie_maj'); |
|
| 169 | 169 | return null; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | foreach ($versions as $v) { |
| 199 | 199 | [$maj2, $min2, $rev2] = explode('.', $v); |
| 200 | - $branche_maj = $maj2 . '.' . $min2; |
|
| 201 | - $version_maj = $maj2 . '.' . $min2 . '.' . $rev2; |
|
| 200 | + $branche_maj = $maj2.'.'.$min2; |
|
| 201 | + $version_maj = $maj2.'.'.$min2.'.'.$rev2; |
|
| 202 | 202 | $is_version_stable = is_numeric($rev2); |
| 203 | 203 | // d'abord les mises à jour de la même branche (version mineure) |
| 204 | 204 | if ( |
@@ -107,8 +107,8 @@ |
||
| 107 | 107 | function message_crash_tables() { |
| 108 | 108 | if ($crash = verifier_crash_tables()) { |
| 109 | 109 | return |
| 110 | - '<strong>' . _T('texte_recuperer_base') . '</strong><br />' |
|
| 111 | - . ' <tt>' . implode(', ', $crash) . '</tt><br />' |
|
| 110 | + '<strong>'._T('texte_recuperer_base').'</strong><br />' |
|
| 111 | + . ' <tt>'.implode(', ', $crash).'</tt><br />' |
|
| 112 | 112 | . generer_form_ecrire( |
| 113 | 113 | 'base_repair', |
| 114 | 114 | _T('texte_crash_base'), |
@@ -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 { |