@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | // creer le repertoire cache, qui sert partout ! |
| 46 | 46 | // deja fait en etape 4 en principe, on garde au cas ou |
| 47 | 47 | if (!@file_exists(_DIR_CACHE)) { |
| 48 | - $rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE); |
|
| 48 | + $rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE); |
|
| 49 | 49 | $rep = sous_repertoire(_DIR_TMP, $rep, true, true); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | if ($msg) { |
| 56 | 56 | $cible = _T('public:accueil_site'); |
| 57 | 57 | $cible = generer_form_ecrire('accueil', '', '', $cible); |
| 58 | - echo minipres('AUTO', $msg . $cible); |
|
| 58 | + echo minipres('AUTO', $msg.$cible); |
|
| 59 | 59 | // ok, deboucher dans l'espace prive |
| 60 | 60 | } else { |
| 61 | 61 | redirige_url_ecrire('accueil'); |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | $averti = _T( |
| 76 | 76 | 'htaccess_a_simuler', |
| 77 | 77 | [ |
| 78 | - 'htaccess' => '<tt>' . _ACCESS_FILE_NAME . '</tt>', |
|
| 78 | + 'htaccess' => '<tt>'._ACCESS_FILE_NAME.'</tt>', |
|
| 79 | 79 | 'constantes' => '<tt>_DIR_TMP & _DIR_CONNECT</tt>', |
| 80 | - 'document_root' => '<tt>' . $_SERVER['DOCUMENT_ROOT'] . '</tt>' |
|
| 80 | + 'document_root' => '<tt>'.$_SERVER['DOCUMENT_ROOT'].'</tt>' |
|
| 81 | 81 | ] |
| 82 | 82 | ); |
| 83 | 83 | |
@@ -48,9 +48,9 @@ discard block |
||
| 48 | 48 | if ($echec) { |
| 49 | 49 | echo minipres( |
| 50 | 50 | 'AUTO', |
| 51 | - info_progression_etape(3, 'etape_', 'install/', true) . |
|
| 52 | - "<div class='error'><h3>$echec</h3>\n" . |
|
| 53 | - '<p>' . _T('avis_connexion_echec_2') . '</p>' . |
|
| 51 | + info_progression_etape(3, 'etape_', 'install/', true). |
|
| 52 | + "<div class='error'><h3>$echec</h3>\n". |
|
| 53 | + '<p>'._T('avis_connexion_echec_2').'</p>'. |
|
| 54 | 54 | '</div>' |
| 55 | 55 | ); |
| 56 | 56 | exit; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $htpass = generer_htpass($pass); |
| 87 | 87 | $alea_actuel = creer_uniqid(); |
| 88 | 88 | $alea_futur = creer_uniqid(); |
| 89 | - $shapass = spip_sha256($alea_actuel . $pass); |
|
| 89 | + $shapass = spip_sha256($alea_actuel.$pass); |
|
| 90 | 90 | // prelablement, creer le champ webmestre si il n'existe pas (install neuve |
| 91 | 91 | // sur une vieille base |
| 92 | 92 | $t = sql_showtable('spip_auteurs', true); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | @sql_alter("TABLE spip_auteurs ADD webmestre varchar(3) DEFAULT 'non' NOT NULL"); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login=' . sql_quote($login)); |
|
| 97 | + $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login='.sql_quote($login)); |
|
| 98 | 98 | if ($id_auteur !== null) { |
| 99 | 99 | sql_updateq('spip_auteurs', [ |
| 100 | 100 | 'nom' => $nom, |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | !$auteur = auth_identifier_login($login, $pass) |
| 135 | 135 | or !auth_loger($auteur, true) |
| 136 | 136 | ) { |
| 137 | - spip_log("login automatique impossible $auth_spip $session" . count($row)); |
|
| 137 | + spip_log("login automatique impossible $auth_spip $session".count($row)); |
|
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | 140 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $GLOBALS['connexions'][$server_db] = $link; |
| 51 | 51 | |
| 52 | 52 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 53 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 53 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 54 | 54 | |
| 55 | 55 | echo install_debut_html(); |
| 56 | 56 | |
@@ -68,18 +68,18 @@ discard block |
||
| 68 | 68 | //echo "\n-->\n"; |
| 69 | 69 | |
| 70 | 70 | if (($db_connect == '0') && $link) { |
| 71 | - echo "<div class='success'><b>" . _T('info_connexion_ok') . '</b></div>'; |
|
| 71 | + echo "<div class='success'><b>"._T('info_connexion_ok').'</b></div>'; |
|
| 72 | 72 | echo info_progression_etape(2, 'etape_', 'install/'); |
| 73 | 73 | |
| 74 | - echo info_etape(_T('menu_aide_installation_choix_base') . aider('install2', true)); |
|
| 74 | + echo info_etape(_T('menu_aide_installation_choix_base').aider('install2', true)); |
|
| 75 | 75 | |
| 76 | 76 | echo "\n", '<!-- ', sql_version($server_db), ' -->'; |
| 77 | 77 | list($checked, $res) = install_etape_2_bases($login_db, $server_db); |
| 78 | 78 | |
| 79 | 79 | $hidden = (defined('_SPIP_CHMOD') |
| 80 | 80 | ? '' |
| 81 | - : ("\n<input type='hidden' name='chmod' value='" . spip_htmlspecialchars($chmod) . "' />")) |
|
| 82 | - . predef_ou_cache($adresse_db . ($port ? ':' . $port : ''), $login_db, $pass_db, $server_db); |
|
| 81 | + : ("\n<input type='hidden' name='chmod' value='".spip_htmlspecialchars($chmod)."' />")) |
|
| 82 | + . predef_ou_cache($adresse_db.($port ? ':'.$port : ''), $login_db, $pass_db, $server_db); |
|
| 83 | 83 | |
| 84 | 84 | echo install_etape_2_form($hidden, $checked, $res, 3); |
| 85 | 85 | } else { |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | echo "<div class='error'>"; |
| 89 | 89 | echo info_etape(_T('info_connexion_base')); |
| 90 | - echo '<h3>' . _T('avis_connexion_echec_1') . '</h3>'; |
|
| 91 | - echo '<p>' . _T('avis_connexion_echec_2') . '</p>'; |
|
| 90 | + echo '<h3>'._T('avis_connexion_echec_1').'</h3>'; |
|
| 91 | + echo '<p>'._T('avis_connexion_echec_2').'</p>'; |
|
| 92 | 92 | |
| 93 | 93 | echo "<p style='font-size: small;'>", |
| 94 | 94 | _T('avis_connexion_echec_3'), |
@@ -121,8 +121,8 @@ discard block |
||
| 121 | 121 | . ' ' |
| 122 | 122 | ]; |
| 123 | 123 | } |
| 124 | - $res = '<b>' . _T('avis_lecture_noms_bases_1') . '</b> |
|
| 125 | - ' . _T('avis_lecture_noms_bases_2') . '<p>'; |
|
| 124 | + $res = '<b>'._T('avis_lecture_noms_bases_1').'</b> |
|
| 125 | + ' . _T('avis_lecture_noms_bases_2').'<p>'; |
|
| 126 | 126 | |
| 127 | 127 | $checked = false; |
| 128 | 128 | if ($login_db) { |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | if ($ok) { |
| 140 | 140 | $res .= _T('avis_lecture_noms_bases_3') |
| 141 | 141 | . '<ul>' |
| 142 | - . '<li><input name="choix_db" value="' . $test_base . "\" type='radio' id='stand' checked='checked' />" |
|
| 143 | - . "<label for='stand'>" . $test_base . "</label></li>\n" |
|
| 142 | + . '<li><input name="choix_db" value="'.$test_base."\" type='radio' id='stand' checked='checked' />" |
|
| 143 | + . "<label for='stand'>".$test_base."</label></li>\n" |
|
| 144 | 144 | . '</ul>' |
| 145 | - . '<p>' . _T('info_ou') . ' '; |
|
| 145 | + . '<p>'._T('info_ou').' '; |
|
| 146 | 146 | $checked = true; |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -156,20 +156,20 @@ discard block |
||
| 156 | 156 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 157 | 157 | . $hidden |
| 158 | 158 | . (defined('_INSTALL_NAME_DB') |
| 159 | - ? '<h3>' . _T('install_nom_base_hebergeur') . ' <tt>' . _INSTALL_NAME_DB . '</tt>' . '</h3>' |
|
| 160 | - : "\n<fieldset><legend>" . _T('texte_choix_base_1') . "</legend>\n" |
|
| 159 | + ? '<h3>'._T('install_nom_base_hebergeur').' <tt>'._INSTALL_NAME_DB.'</tt>'.'</h3>' |
|
| 160 | + : "\n<fieldset><legend>"._T('texte_choix_base_1')."</legend>\n" |
|
| 161 | 161 | . $res |
| 162 | 162 | . "\n<input name=\"choix_db\" value=\"new_spip\" type='radio' id='nou'" |
| 163 | 163 | . ($checked ? '' : " checked='checked'") |
| 164 | - . " />\n<label for='nou'>" . _T('info_creer_base') . "</label></p>\n<p>" |
|
| 164 | + . " />\n<label for='nou'>"._T('info_creer_base')."</label></p>\n<p>" |
|
| 165 | 165 | . "\n<input type='text' name='table_new' class='text' value=\"spip\" size='20' /></p></fieldset>\n" |
| 166 | 166 | ) |
| 167 | 167 | |
| 168 | 168 | . ((defined('_INSTALL_TABLE_PREFIX') |
| 169 | 169 | or $GLOBALS['table_prefix'] != 'spip') |
| 170 | - ? '<h3>' . _T('install_table_prefix_hebergeur') . ' <tt>' . $GLOBALS['table_prefix'] . '</tt>' . '</h3>' |
|
| 171 | - : '<fieldset><legend>' . _T('texte_choix_table_prefix') . "</legend>\n" |
|
| 172 | - . "<p><label for='table_prefix'>" . _T('info_table_prefix') . '</label></p><p>' |
|
| 170 | + ? '<h3>'._T('install_table_prefix_hebergeur').' <tt>'.$GLOBALS['table_prefix'].'</tt>'.'</h3>' |
|
| 171 | + : '<fieldset><legend>'._T('texte_choix_table_prefix')."</legend>\n" |
|
| 172 | + . "<p><label for='table_prefix'>"._T('info_table_prefix').'</label></p><p>' |
|
| 173 | 173 | . "\n<input type='text' id='tprefix' name='tprefix' class='text' value='" |
| 174 | 174 | . 'spip' # valeur par defaut |
| 175 | 175 | . "' size='20' /></p></fieldset>" |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | // creer le repertoire cache, qui sert partout ! |
| 23 | 23 | if (!@file_exists(_DIR_CACHE)) { |
| 24 | - $rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE); |
|
| 24 | + $rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE); |
|
| 25 | 25 | $rep = sous_repertoire(_DIR_TMP, $rep, true, true); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | echo '<p>' |
| 40 | 40 | . _T( |
| 41 | 41 | 'plugin_info_plugins_dist_1', |
| 42 | - ['plugins_dist' => '<tt>' . joli_repertoire(_DIR_PLUGINS_DIST) . '</tt>'] |
|
| 42 | + ['plugins_dist' => '<tt>'.joli_repertoire(_DIR_PLUGINS_DIST).'</tt>'] |
|
| 43 | 43 | ) |
| 44 | 44 | . '</p>'; |
| 45 | 45 | |
@@ -52,29 +52,28 @@ discard block |
||
| 52 | 52 | $conn = "\$GLOBALS['ldap_base'] = '$base_ldap';\n" |
| 53 | 53 | . "\$GLOBALS['ldap_link'] = @ldap_connect('$adresse_ldap','$port_ldap');\n" |
| 54 | 54 | . "@ldap_set_option(\$GLOBALS['ldap_link'],LDAP_OPT_PROTOCOL_VERSION,'$protocole_ldap');\n" |
| 55 | - . (($tls_ldap != 'oui') ? '' : |
|
| 56 | - "@ldap_start_tls(\$GLOBALS['ldap_link']);\n") |
|
| 55 | + . (($tls_ldap != 'oui') ? '' : "@ldap_start_tls(\$GLOBALS['ldap_link']);\n") |
|
| 57 | 56 | . "@ldap_bind(\$GLOBALS['ldap_link'],'$login_ldap','$pass_ldap');\n"; |
| 58 | 57 | |
| 59 | 58 | $champs = is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : []; |
| 60 | 59 | $res = ''; |
| 61 | 60 | foreach ($champs as $champ => $v) { |
| 62 | - $nom = 'ldap_' . $champ; |
|
| 61 | + $nom = 'ldap_'.$champ; |
|
| 63 | 62 | $val = trim(_request($nom)); |
| 64 | 63 | if (preg_match('/^\w*$/', $val)) { |
| 65 | 64 | if ($val) { |
| 66 | 65 | $val = _q($val); |
| 67 | 66 | } |
| 68 | 67 | } else { |
| 69 | - $val = 'array(' . _q(preg_split('/\W+/', $val)) . ')'; |
|
| 68 | + $val = 'array('._q(preg_split('/\W+/', $val)).')'; |
|
| 70 | 69 | }; |
| 71 | 70 | if ($val) { |
| 72 | - $res .= "'$champ' => " . $val . ','; |
|
| 71 | + $res .= "'$champ' => ".$val.','; |
|
| 73 | 72 | } |
| 74 | 73 | } |
| 75 | 74 | $conn .= "\$GLOBALS['ldap_champs'] = array($res);\n"; |
| 76 | 75 | |
| 77 | - install_fichier_connexion(_DIR_CONNECT . _FILE_LDAP, $conn); |
|
| 76 | + install_fichier_connexion(_DIR_CONNECT._FILE_LDAP, $conn); |
|
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | function etape_ldap5_suite() { |
@@ -87,7 +86,7 @@ discard block |
||
| 87 | 86 | ); |
| 88 | 87 | |
| 89 | 88 | echo generer_form_ecrire('install', ( |
| 90 | - "<input type='hidden' name='etape' value='3' />" . |
|
| 89 | + "<input type='hidden' name='etape' value='3' />". |
|
| 91 | 90 | "<input type='hidden' name='ldap_present' value='true' />" |
| 92 | 91 | . bouton_suivant())); |
| 93 | 92 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $headers = ''; |
| 52 | 52 | if (isset($page['entetes']) and count($page['entetes'])) { |
| 53 | 53 | foreach ($page['entetes'] as $k => $v) { |
| 54 | - $headers .= (strlen($v) ? "$k: $v" : $k) . "\n"; |
|
| 54 | + $headers .= (strlen($v) ? "$k: $v" : $k)."\n"; |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | |
@@ -29,11 +29,11 @@ discard block |
||
| 29 | 29 | function genie_mise_a_jour_dist($t) { |
| 30 | 30 | include_spip('inc/meta'); |
| 31 | 31 | $maj = info_maj('spip', 'SPIP', $GLOBALS['spip_version_branche']); |
| 32 | - ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non'); |
|
| 32 | + ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non'); |
|
| 33 | 33 | |
| 34 | 34 | mise_a_jour_ecran_securite(); |
| 35 | 35 | |
| 36 | - spip_log('Verification version SPIP : ' . ($maj ? $maj : 'version a jour'), 'verifie_maj'); |
|
| 36 | + spip_log('Verification version SPIP : '.($maj ? $maj : 'version a jour'), 'verifie_maj'); |
|
| 37 | 37 | |
| 38 | 38 | return 1; |
| 39 | 39 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | // si l'ecran n'est pas deja present ou pas updatable, sortir |
| 59 | 59 | if ( |
| 60 | 60 | !_URL_ECRAN_SECURITE |
| 61 | - or !file_exists($filename = _DIR_ETC . 'ecran_securite.php') |
|
| 61 | + or !file_exists($filename = _DIR_ETC.'ecran_securite.php') |
|
| 62 | 62 | or !is_writable($filename) |
| 63 | 63 | or !$last_modified = filemtime($filename) |
| 64 | 64 | or !$md5 = md5_file($filename) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | include_spip('inc/distant'); |
| 70 | - $tmp_file = _DIR_TMP . 'ecran_securite.php'; |
|
| 70 | + $tmp_file = _DIR_TMP.'ecran_securite.php'; |
|
| 71 | 71 | $url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5); |
| 72 | 72 | $url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']); |
| 73 | 73 | $res = recuperer_url($url, [ |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | include_once $tmp_file; |
| 87 | 87 | // ok, on le copie a la place de l'ecran existant |
| 88 | 88 | // en backupant l'ecran avant, au cas ou |
| 89 | - @copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified)); |
|
| 89 | + @copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified)); |
|
| 90 | 90 | @rename($tmp_file, $filename); |
| 91 | 91 | } else { |
| 92 | 92 | @unlink($tmp_file); |
@@ -113,14 +113,14 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | list($maj, $min, $rev) = preg_split('/\D+/', $version); |
| 115 | 115 | |
| 116 | - $nom = _DIR_CACHE_XML . _VERSIONS_LISTE; |
|
| 116 | + $nom = _DIR_CACHE_XML._VERSIONS_LISTE; |
|
| 117 | 117 | $page = !file_exists($nom) ? '' : file_get_contents($nom); |
| 118 | 118 | $page = info_maj_cache($nom, $dir, $page); |
| 119 | 119 | |
| 120 | 120 | // reperer toutes les versions de numero majeur superieur ou egal |
| 121 | 121 | // (a revoir quand on arrivera a SPIP V10 ...) |
| 122 | 122 | $p = substr('0123456789', intval($maj)); |
| 123 | - $p = ',/' . $file . '\D+([' . $p . ']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i'; |
|
| 123 | + $p = ',/'.$file.'\D+(['.$p.']+)\D+(\d+)(\D+(\d+))?.*?[.]zip",i'; |
|
| 124 | 124 | preg_match_all($p, $page, $m, PREG_SET_ORDER); |
| 125 | 125 | $page = $page_majeure = ''; |
| 126 | 126 | |
@@ -129,9 +129,9 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | foreach ($m as $v) { |
| 131 | 131 | $v = array_pad($v, 5, 0); |
| 132 | - list(, $maj2, $min2, , $rev2) = $v; |
|
| 133 | - $branche_maj = $maj2 . '.' . $min2; |
|
| 134 | - $version_maj = $maj2 . '.' . $min2 . '.' . $rev2; |
|
| 132 | + list(, $maj2, $min2,, $rev2) = $v; |
|
| 133 | + $branche_maj = $maj2.'.'.$min2; |
|
| 134 | + $version_maj = $maj2.'.'.$min2.'.'.$rev2; |
|
| 135 | 135 | // d'abord les mises à jour de la même branche |
| 136 | 136 | if ( |
| 137 | 137 | (spip_version_compare($version, $version_maj, '<')) |
@@ -153,10 +153,10 @@ discard block |
||
| 153 | 153 | return ''; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $message = $page ? _T('nouvelle_version_spip', ['version' => $page]) . ($page_majeure ? ' | ' : '') : ''; |
|
| 156 | + $message = $page ? _T('nouvelle_version_spip', ['version' => $page]).($page_majeure ? ' | ' : '') : ''; |
|
| 157 | 157 | $message .= $page_majeure ? _T('nouvelle_version_spip_majeure', ['version' => $page_majeure]) : ''; |
| 158 | 158 | |
| 159 | - return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>" . $message . '</a>'; |
|
| 159 | + return "<a class='info_maj_spip' href='https://www.spip.net/fr_update' title='$page'>".$message.'</a>'; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -179,12 +179,12 @@ discard block |
||
| 179 | 179 | function info_maj_cache($nom, $dir, $page = '') { |
| 180 | 180 | include_spip('inc/acces'); |
| 181 | 181 | $alea_ephemere = charger_aleas(); |
| 182 | - $re = '<archives id="a' . $alea_ephemere . '">'; |
|
| 182 | + $re = '<archives id="a'.$alea_ephemere.'">'; |
|
| 183 | 183 | if (preg_match("/$re/", $page)) { |
| 184 | 184 | return $page; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - $url = _VERSIONS_SERVEUR . $dir . '/' . _VERSIONS_LISTE; |
|
| 187 | + $url = _VERSIONS_SERVEUR.$dir.'/'._VERSIONS_LISTE; |
|
| 188 | 188 | $a = file_exists($nom) ? filemtime($nom) : ''; |
| 189 | 189 | include_spip('inc/distant'); |
| 190 | 190 | $res = recuperer_url_cache($url, ['if_modified_since' => $a]); |
@@ -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>' . join(', ', $crash) . '</tt><br />' |
|
| 110 | + '<strong>'._T('texte_recuperer_base').'</strong><br />' |
|
| 111 | + . ' <tt>'.join(', ', $crash).'</tt><br />' |
|
| 112 | 112 | . generer_form_ecrire( |
| 113 | 113 | 'base_repair', |
| 114 | 114 | _T('texte_crash_base'), |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | function optimiser_caches_contextes() { |
| 53 | 53 | sous_repertoire(_DIR_CACHE, 'contextes'); |
| 54 | - if (is_dir($d = _DIR_CACHE . 'contextes')) { |
|
| 54 | + if (is_dir($d = _DIR_CACHE.'contextes')) { |
|
| 55 | 55 | include_spip('inc/invalideur'); |
| 56 | 56 | purger_repertoire($d, ['mtime' => time() - 48 * 24 * 3600, 'limit' => 10000]); |
| 57 | 57 | } |
@@ -96,16 +96,16 @@ discard block |
||
| 96 | 96 | $tables[] = array_shift($row); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - spip_log('optimiser_base_une_table ' . json_encode($tables), 'genie' . _LOG_DEBUG); |
|
| 99 | + spip_log('optimiser_base_une_table '.json_encode($tables), 'genie'._LOG_DEBUG); |
|
| 100 | 100 | if ($tables) { |
| 101 | 101 | $table_op = intval(lire_config('optimiser_table', 0) + 1) % sizeof($tables); |
| 102 | 102 | ecrire_config('optimiser_table', $table_op); |
| 103 | 103 | $q = $tables[$table_op]; |
| 104 | - spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie' . _LOG_DEBUG); |
|
| 104 | + spip_log("optimiser_base_une_table : debut d'optimisation de la table $q", 'genie'._LOG_DEBUG); |
|
| 105 | 105 | if (sql_optimize($q)) { |
| 106 | - spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie' . _LOG_DEBUG); |
|
| 106 | + spip_log("optimiser_base_une_table : fin d'optimisation de la table $q", 'genie'._LOG_DEBUG); |
|
| 107 | 107 | } else { |
| 108 | - spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie' . _LOG_DEBUG); |
|
| 108 | + spip_log("optimiser_base_une_table : Pas d'optimiseur necessaire", 'genie'._LOG_DEBUG); |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | } |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | sql_free($sel); |
| 141 | 141 | |
| 142 | 142 | if ($in) { |
| 143 | - sql_delete($table, sql_in($id, array_keys($in)) . ($and ? " AND $and" : '')); |
|
| 144 | - spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: " . implode(', ', array_keys($in)), 'genie' . _LOG_DEBUG); |
|
| 143 | + sql_delete($table, sql_in($id, array_keys($in)).($and ? " AND $and" : '')); |
|
| 144 | + spip_log("optimiser_sansref: Numeros des entrees $id supprimees dans la table $table: ".implode(', ', array_keys($in)), 'genie'._LOG_DEBUG); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return count($in); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | if (!defined('_AUTEURS_DELAI_REJET_NOUVEAU')) { |
| 222 | 222 | define('_AUTEURS_DELAI_REJET_NOUVEAU', 45 * 24 * 3600); |
| 223 | 223 | } |
| 224 | - sql_delete('spip_auteurs', "statut='nouveau' AND maj < " . sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU)))); |
|
| 224 | + sql_delete('spip_auteurs', "statut='nouveau' AND maj < ".sql_quote(date('Y-m-d', time() - intval(_AUTEURS_DELAI_REJET_NOUVEAU)))); |
|
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | 227 | * Permet aux plugins de compléter l'optimisation suite aux éléments disparus |
@@ -242,5 +242,5 @@ discard block |
||
| 242 | 242 | ]); |
| 243 | 243 | |
| 244 | 244 | |
| 245 | - spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie' . _LOG_DEBUG); |
|
| 245 | + spip_log("optimiser_base_disparus : {$n} lien(s) mort(s)", 'genie'._LOG_DEBUG); |
|
| 246 | 246 | } |