@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 10 | - return; |
|
| 10 | + return; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | include_spip('inc/actions'); |
@@ -21,23 +21,23 @@ discard block |
||
| 21 | 21 | * @uses ajax_retour() |
| 22 | 22 | */ |
| 23 | 23 | function exec_info_plugin_dist() { |
| 24 | - if (!autoriser('configurer', '_plugins')) { |
|
| 25 | - include_spip('inc/minipres'); |
|
| 26 | - echo minipres(); |
|
| 27 | - } else { |
|
| 28 | - $plug = _DIR_RACINE . htmlspecialchars(_request('plugin')); |
|
| 29 | - $get_infos = charger_fonction('get_infos', 'plugins'); |
|
| 30 | - $dir = ""; |
|
| 31 | - if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0) { |
|
| 32 | - $dir = _DIR_PLUGINS; |
|
| 33 | - } elseif (strncmp($plug, _DIR_PLUGINS_DIST, strlen(_DIR_PLUGINS_DIST)) == 0) { |
|
| 34 | - $dir = _DIR_PLUGINS_DIST; |
|
| 35 | - } |
|
| 36 | - if ($dir) { |
|
| 37 | - $plug = substr($plug, strlen($dir)); |
|
| 38 | - } |
|
| 39 | - $info = $get_infos($plug, false, $dir); |
|
| 40 | - $afficher_plugin = charger_fonction("afficher_plugin", "plugins"); |
|
| 41 | - ajax_retour(affiche_bloc_plugin($plug, $info, $dir)); |
|
| 42 | - } |
|
| 24 | + if (!autoriser('configurer', '_plugins')) { |
|
| 25 | + include_spip('inc/minipres'); |
|
| 26 | + echo minipres(); |
|
| 27 | + } else { |
|
| 28 | + $plug = _DIR_RACINE . htmlspecialchars(_request('plugin')); |
|
| 29 | + $get_infos = charger_fonction('get_infos', 'plugins'); |
|
| 30 | + $dir = ""; |
|
| 31 | + if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0) { |
|
| 32 | + $dir = _DIR_PLUGINS; |
|
| 33 | + } elseif (strncmp($plug, _DIR_PLUGINS_DIST, strlen(_DIR_PLUGINS_DIST)) == 0) { |
|
| 34 | + $dir = _DIR_PLUGINS_DIST; |
|
| 35 | + } |
|
| 36 | + if ($dir) { |
|
| 37 | + $plug = substr($plug, strlen($dir)); |
|
| 38 | + } |
|
| 39 | + $info = $get_infos($plug, false, $dir); |
|
| 40 | + $afficher_plugin = charger_fonction("afficher_plugin", "plugins"); |
|
| 41 | + ajax_retour(affiche_bloc_plugin($plug, $info, $dir)); |
|
| 42 | + } |
|
| 43 | 43 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | include_spip('inc/minipres'); |
| 26 | 26 | echo minipres(); |
| 27 | 27 | } else { |
| 28 | - $plug = _DIR_RACINE . htmlspecialchars(_request('plugin')); |
|
| 28 | + $plug = _DIR_RACINE.htmlspecialchars(_request('plugin')); |
|
| 29 | 29 | $get_infos = charger_fonction('get_infos', 'plugins'); |
| 30 | 30 | $dir = ""; |
| 31 | 31 | if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0) { |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -27,40 +27,40 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | function exec_403_dist($message = '') { |
| 29 | 29 | |
| 30 | - $exec = _request('exec'); |
|
| 30 | + $exec = _request('exec'); |
|
| 31 | 31 | |
| 32 | - $titre = "exec_$exec"; |
|
| 33 | - $navigation = ''; |
|
| 34 | - $extra = ''; |
|
| 32 | + $titre = "exec_$exec"; |
|
| 33 | + $navigation = ''; |
|
| 34 | + $extra = ''; |
|
| 35 | 35 | |
| 36 | - if (!$message) { |
|
| 37 | - $message = _L("Vous n'avez pas le droit d'accéder à la page <b>@exec@</b>.", array('exec' => _request('exec'))); |
|
| 38 | - } |
|
| 36 | + if (!$message) { |
|
| 37 | + $message = _L("Vous n'avez pas le droit d'accéder à la page <b>@exec@</b>.", array('exec' => _request('exec'))); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - $contenu = "<h1 class='grostitre'>" . _T('info_acces_interdit') . '</h1>' . $message; |
|
| 40 | + $contenu = "<h1 class='grostitre'>" . _T('info_acces_interdit') . '</h1>' . $message; |
|
| 41 | 41 | |
| 42 | - if (_request('var_zajax')) { |
|
| 43 | - include_spip('inc/actions'); |
|
| 44 | - ajax_retour($contenu); |
|
| 45 | - } else { |
|
| 46 | - include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini |
|
| 42 | + if (_request('var_zajax')) { |
|
| 43 | + include_spip('inc/actions'); |
|
| 44 | + ajax_retour($contenu); |
|
| 45 | + } else { |
|
| 46 | + include_spip('inc/presentation'); // alleger les inclusions avec un inc/presentation_mini |
|
| 47 | 47 | |
| 48 | - $commencer_page = charger_fonction('commencer_page', 'inc'); |
|
| 49 | - echo $commencer_page($titre); |
|
| 48 | + $commencer_page = charger_fonction('commencer_page', 'inc'); |
|
| 49 | + echo $commencer_page($titre); |
|
| 50 | 50 | |
| 51 | - echo debut_gauche("403_$exec", true); |
|
| 52 | - echo recuperer_fond('prive/squelettes/navigation/dist', array()); |
|
| 53 | - echo pipeline('affiche_gauche', array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => '')); |
|
| 51 | + echo debut_gauche("403_$exec", true); |
|
| 52 | + echo recuperer_fond('prive/squelettes/navigation/dist', array()); |
|
| 53 | + echo pipeline('affiche_gauche', array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => '')); |
|
| 54 | 54 | |
| 55 | - echo creer_colonne_droite('403', true); |
|
| 56 | - echo pipeline('affiche_droite', array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => '')); |
|
| 55 | + echo creer_colonne_droite('403', true); |
|
| 56 | + echo pipeline('affiche_droite', array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => '')); |
|
| 57 | 57 | |
| 58 | - echo debut_droite('403', true); |
|
| 59 | - echo pipeline( |
|
| 60 | - 'affiche_milieu', |
|
| 61 | - array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => $contenu) |
|
| 62 | - ); |
|
| 58 | + echo debut_droite('403', true); |
|
| 59 | + echo pipeline( |
|
| 60 | + 'affiche_milieu', |
|
| 61 | + array('args' => array('exec' => '403', 'exec_erreur' => $exec), 'data' => $contenu) |
|
| 62 | + ); |
|
| 63 | 63 | |
| 64 | - echo fin_gauche(), fin_page(); |
|
| 65 | - } |
|
| 64 | + echo fin_gauche(), fin_page(); |
|
| 65 | + } |
|
| 66 | 66 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $message = _L("Vous n'avez pas le droit d'accéder à la page <b>@exec@</b>.", array('exec' => _request('exec'))); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - $contenu = "<h1 class='grostitre'>" . _T('info_acces_interdit') . '</h1>' . $message; |
|
| 40 | + $contenu = "<h1 class='grostitre'>"._T('info_acces_interdit').'</h1>'.$message; |
|
| 41 | 41 | |
| 42 | 42 | if (_request('var_zajax')) { |
| 43 | 43 | include_spip('inc/actions'); |
@@ -17,38 +17,38 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Exec de la page de destruction des tables de SPIP |
| 25 | 25 | **/ |
| 26 | 26 | function exec_base_delete_all_dist() { |
| 27 | - include_spip('inc/autoriser'); |
|
| 28 | - if (!autoriser('detruire')) { |
|
| 29 | - include_spip('inc/minipres'); |
|
| 30 | - echo minipres(); |
|
| 31 | - } else { |
|
| 32 | - include_spip('base/dump'); |
|
| 33 | - $res = base_lister_toutes_tables('', array(), array(), true); |
|
| 34 | - if (!$res) { |
|
| 35 | - include_spip('inc/minipres'); |
|
| 36 | - spip_log("Erreur base de donnees"); |
|
| 37 | - echo minipres(_T('info_travaux_titre'), |
|
| 38 | - _T('titre_probleme_technique') . "<p><tt>" . sql_errno() . " " . sql_error() . "</tt></p>"); |
|
| 39 | - } else { |
|
| 40 | - $res = base_saisie_tables('delete', $res); |
|
| 41 | - include_spip('inc/headers'); |
|
| 42 | - $res = "\n<ol style='text-align:left'><li>\n" . |
|
| 43 | - join("</li>\n<li>", $res) . |
|
| 44 | - '</li></ol>'; |
|
| 45 | - $admin = charger_fonction('admin', 'inc'); |
|
| 46 | - $res = $admin('delete_all', _T('titre_page_delete_all'), $res); |
|
| 47 | - if (!$res) { |
|
| 48 | - redirige_url_ecrire('install', ''); |
|
| 49 | - } else { |
|
| 50 | - echo $res; |
|
| 51 | - } |
|
| 52 | - } |
|
| 53 | - } |
|
| 27 | + include_spip('inc/autoriser'); |
|
| 28 | + if (!autoriser('detruire')) { |
|
| 29 | + include_spip('inc/minipres'); |
|
| 30 | + echo minipres(); |
|
| 31 | + } else { |
|
| 32 | + include_spip('base/dump'); |
|
| 33 | + $res = base_lister_toutes_tables('', array(), array(), true); |
|
| 34 | + if (!$res) { |
|
| 35 | + include_spip('inc/minipres'); |
|
| 36 | + spip_log("Erreur base de donnees"); |
|
| 37 | + echo minipres(_T('info_travaux_titre'), |
|
| 38 | + _T('titre_probleme_technique') . "<p><tt>" . sql_errno() . " " . sql_error() . "</tt></p>"); |
|
| 39 | + } else { |
|
| 40 | + $res = base_saisie_tables('delete', $res); |
|
| 41 | + include_spip('inc/headers'); |
|
| 42 | + $res = "\n<ol style='text-align:left'><li>\n" . |
|
| 43 | + join("</li>\n<li>", $res) . |
|
| 44 | + '</li></ol>'; |
|
| 45 | + $admin = charger_fonction('admin', 'inc'); |
|
| 46 | + $res = $admin('delete_all', _T('titre_page_delete_all'), $res); |
|
| 47 | + if (!$res) { |
|
| 48 | + redirige_url_ecrire('install', ''); |
|
| 49 | + } else { |
|
| 50 | + echo $res; |
|
| 51 | + } |
|
| 52 | + } |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -35,12 +35,12 @@ |
||
| 35 | 35 | include_spip('inc/minipres'); |
| 36 | 36 | spip_log("Erreur base de donnees"); |
| 37 | 37 | echo minipres(_T('info_travaux_titre'), |
| 38 | - _T('titre_probleme_technique') . "<p><tt>" . sql_errno() . " " . sql_error() . "</tt></p>"); |
|
| 38 | + _T('titre_probleme_technique')."<p><tt>".sql_errno()." ".sql_error()."</tt></p>"); |
|
| 39 | 39 | } else { |
| 40 | 40 | $res = base_saisie_tables('delete', $res); |
| 41 | 41 | include_spip('inc/headers'); |
| 42 | - $res = "\n<ol style='text-align:left'><li>\n" . |
|
| 43 | - join("</li>\n<li>", $res) . |
|
| 42 | + $res = "\n<ol style='text-align:left'><li>\n". |
|
| 43 | + join("</li>\n<li>", $res). |
|
| 44 | 44 | '</li></ol>'; |
| 45 | 45 | $admin = charger_fonction('admin', 'inc'); |
| 46 | 46 | $res = $admin('delete_all', _T('titre_page_delete_all'), $res); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Rubriques |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | include_spip('inc/actions'); |
@@ -28,21 +28,21 @@ discard block |
||
| 28 | 28 | * @uses ajax_retour() |
| 29 | 29 | **/ |
| 30 | 30 | function exec_selectionner_dist() { |
| 31 | - $id = intval(_request('id')); |
|
| 32 | - $exclus = intval(_request('exclus')); |
|
| 33 | - $type = _request('type'); |
|
| 34 | - $rac = _request('racine'); |
|
| 35 | - $do = _request('do'); |
|
| 36 | - if (preg_match('/^\w*$/', $do)) { |
|
| 37 | - if (!$do) { |
|
| 38 | - $do = 'aff'; |
|
| 39 | - } |
|
| 31 | + $id = intval(_request('id')); |
|
| 32 | + $exclus = intval(_request('exclus')); |
|
| 33 | + $type = _request('type'); |
|
| 34 | + $rac = _request('racine'); |
|
| 35 | + $do = _request('do'); |
|
| 36 | + if (preg_match('/^\w*$/', $do)) { |
|
| 37 | + if (!$do) { |
|
| 38 | + $do = 'aff'; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - $selectionner = charger_fonction('selectionner', 'inc'); |
|
| 41 | + $selectionner = charger_fonction('selectionner', 'inc'); |
|
| 42 | 42 | |
| 43 | - $r = $selectionner($id, "choix_parent", $exclus, $rac, $type != 'breve', $do); |
|
| 44 | - } else { |
|
| 45 | - $r = ''; |
|
| 46 | - } |
|
| 47 | - ajax_retour($r); |
|
| 43 | + $r = $selectionner($id, "choix_parent", $exclus, $rac, $type != 'breve', $do); |
|
| 44 | + } else { |
|
| 45 | + $r = ''; |
|
| 46 | + } |
|
| 47 | + ajax_retour($r); |
|
| 48 | 48 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/actions'); |
@@ -29,20 +29,20 @@ discard block |
||
| 29 | 29 | * @uses ajax_retour() |
| 30 | 30 | **/ |
| 31 | 31 | function exec_informer_dist() { |
| 32 | - $id = intval(_request('id')); |
|
| 33 | - $col = intval(_request('col')); |
|
| 34 | - $exclus = intval(_request('exclus')); |
|
| 35 | - $do = _request('do'); |
|
| 32 | + $id = intval(_request('id')); |
|
| 33 | + $col = intval(_request('col')); |
|
| 34 | + $exclus = intval(_request('exclus')); |
|
| 35 | + $do = _request('do'); |
|
| 36 | 36 | |
| 37 | - if (preg_match('/^\w*$/', $do)) { |
|
| 38 | - if (!$do) { |
|
| 39 | - $do = 'aff'; |
|
| 40 | - } |
|
| 37 | + if (preg_match('/^\w*$/', $do)) { |
|
| 38 | + if (!$do) { |
|
| 39 | + $do = 'aff'; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - $informer = charger_fonction('informer', 'inc'); |
|
| 43 | - $res = $informer($id, $col, $exclus, _request('rac'), _request('type'), $do); |
|
| 44 | - } else { |
|
| 45 | - $res = ''; |
|
| 46 | - } |
|
| 47 | - ajax_retour($res); |
|
| 42 | + $informer = charger_fonction('informer', 'inc'); |
|
| 43 | + $res = $informer($id, $col, $exclus, _request('rac'), _request('type'), $do); |
|
| 44 | + } else { |
|
| 45 | + $res = ''; |
|
| 46 | + } |
|
| 47 | + ajax_retour($res); |
|
| 48 | 48 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/actions'); |
@@ -30,63 +30,63 @@ discard block |
||
| 30 | 30 | **/ |
| 31 | 31 | function exec_upgrade_dist() { |
| 32 | 32 | |
| 33 | - if (!_FILE_CONNECT) { |
|
| 34 | - redirige_url_ecrire("install"); |
|
| 35 | - } |
|
| 33 | + if (!_FILE_CONNECT) { |
|
| 34 | + redirige_url_ecrire("install"); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - // Si reinstallation necessaire, message ad hoc |
|
| 38 | - if (_request('reinstall') == 'oui') { |
|
| 39 | - include_spip('inc/minipres'); |
|
| 40 | - $r = minipres(_T('titre_page_upgrade'), |
|
| 41 | - "<p><b>" |
|
| 42 | - . _T('texte_nouvelle_version_spip_1') |
|
| 43 | - . "</b><p> " |
|
| 44 | - . _T('texte_nouvelle_version_spip_2', |
|
| 45 | - array('connect' => '<tt>' . _FILE_CONNECT . '</tt>')) |
|
| 46 | - . generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', |
|
| 47 | - _T('bouton_relancer_installation'))); |
|
| 48 | - echo $r; |
|
| 49 | - } elseif (_request('fin')) { |
|
| 50 | - include_spip('inc/plugin'); |
|
| 51 | - actualise_plugins_actifs(); |
|
| 52 | - include_spip('inc/headers'); |
|
| 53 | - $res = generer_url_ecrire('admin_plugin', 'var_mode=recalcul'); |
|
| 54 | - echo redirige_formulaire($res); |
|
| 55 | - } else { |
|
| 37 | + // Si reinstallation necessaire, message ad hoc |
|
| 38 | + if (_request('reinstall') == 'oui') { |
|
| 39 | + include_spip('inc/minipres'); |
|
| 40 | + $r = minipres(_T('titre_page_upgrade'), |
|
| 41 | + "<p><b>" |
|
| 42 | + . _T('texte_nouvelle_version_spip_1') |
|
| 43 | + . "</b><p> " |
|
| 44 | + . _T('texte_nouvelle_version_spip_2', |
|
| 45 | + array('connect' => '<tt>' . _FILE_CONNECT . '</tt>')) |
|
| 46 | + . generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', |
|
| 47 | + _T('bouton_relancer_installation'))); |
|
| 48 | + echo $r; |
|
| 49 | + } elseif (_request('fin')) { |
|
| 50 | + include_spip('inc/plugin'); |
|
| 51 | + actualise_plugins_actifs(); |
|
| 52 | + include_spip('inc/headers'); |
|
| 53 | + $res = generer_url_ecrire('admin_plugin', 'var_mode=recalcul'); |
|
| 54 | + echo redirige_formulaire($res); |
|
| 55 | + } else { |
|
| 56 | 56 | |
| 57 | - if (!isset($GLOBALS['meta']['version_installee'])) { |
|
| 58 | - $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 59 | - } else { |
|
| 60 | - $GLOBALS['meta']['version_installee'] = |
|
| 61 | - (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 62 | - } |
|
| 63 | - # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 64 | - # enregistree au format '1,812' et non '1.812' |
|
| 57 | + if (!isset($GLOBALS['meta']['version_installee'])) { |
|
| 58 | + $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 59 | + } else { |
|
| 60 | + $GLOBALS['meta']['version_installee'] = |
|
| 61 | + (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 62 | + } |
|
| 63 | + # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 64 | + # enregistree au format '1,812' et non '1.812' |
|
| 65 | 65 | |
| 66 | - // Erreur downgrade |
|
| 67 | - // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 68 | - if ($GLOBALS['spip_version_base'] < $GLOBALS['meta']['version_installee']) { |
|
| 69 | - $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 70 | - } // Commentaire standard upgrade |
|
| 71 | - else { |
|
| 72 | - $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 73 | - } |
|
| 66 | + // Erreur downgrade |
|
| 67 | + // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 68 | + if ($GLOBALS['spip_version_base'] < $GLOBALS['meta']['version_installee']) { |
|
| 69 | + $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 70 | + } // Commentaire standard upgrade |
|
| 71 | + else { |
|
| 72 | + $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - $commentaire .= "<br />[" . $GLOBALS['meta']['version_installee'] . "/" . $GLOBALS['spip_version_base'] . "]"; |
|
| 75 | + $commentaire .= "<br />[" . $GLOBALS['meta']['version_installee'] . "/" . $GLOBALS['spip_version_base'] . "]"; |
|
| 76 | 76 | |
| 77 | - $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 78 | - include_spip('inc/headers'); |
|
| 79 | - $admin = charger_fonction('admin', 'inc'); |
|
| 80 | - $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 81 | - if ($res) { |
|
| 82 | - echo $res; |
|
| 83 | - } else { |
|
| 84 | - // effacer les alea pour forcer leur relecture |
|
| 85 | - // si jamais ils ont change pendant l'upgrade |
|
| 86 | - unset($GLOBALS['meta']['alea_ephemere']); |
|
| 87 | - unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 88 | - $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 89 | - echo redirige_formulaire($res); |
|
| 90 | - } |
|
| 91 | - } |
|
| 77 | + $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 78 | + include_spip('inc/headers'); |
|
| 79 | + $admin = charger_fonction('admin', 'inc'); |
|
| 80 | + $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 81 | + if ($res) { |
|
| 82 | + echo $res; |
|
| 83 | + } else { |
|
| 84 | + // effacer les alea pour forcer leur relecture |
|
| 85 | + // si jamais ils ont change pendant l'upgrade |
|
| 86 | + unset($GLOBALS['meta']['alea_ephemere']); |
|
| 87 | + unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 88 | + $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 89 | + echo redirige_formulaire($res); |
|
| 90 | + } |
|
| 91 | + } |
|
| 92 | 92 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | . _T('texte_nouvelle_version_spip_1') |
| 43 | 43 | . "</b><p> " |
| 44 | 44 | . _T('texte_nouvelle_version_spip_2', |
| 45 | - array('connect' => '<tt>' . _FILE_CONNECT . '</tt>')) |
|
| 45 | + array('connect' => '<tt>'._FILE_CONNECT.'</tt>')) |
|
| 46 | 46 | . generer_form_ecrire('upgrade', "<input type='hidden' name='reinstall' value='non' />", '', |
| 47 | 47 | _T('bouton_relancer_installation'))); |
| 48 | 48 | echo $r; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $GLOBALS['meta']['version_installee'] = 0.0; |
| 59 | 59 | } else { |
| 60 | 60 | $GLOBALS['meta']['version_installee'] = |
| 61 | - (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 61 | + (double) str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 62 | 62 | } |
| 63 | 63 | # NB: str_replace car, sur club-internet, il semble que version_installe soit |
| 64 | 64 | # enregistree au format '1,812' et non '1.812' |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $commentaire = _T('texte_mise_a_niveau_base_1'); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - $commentaire .= "<br />[" . $GLOBALS['meta']['version_installee'] . "/" . $GLOBALS['spip_version_base'] . "]"; |
|
| 75 | + $commentaire .= "<br />[".$GLOBALS['meta']['version_installee']."/".$GLOBALS['spip_version_base']."]"; |
|
| 76 | 76 | |
| 77 | 77 | $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
| 78 | 78 | include_spip('inc/headers'); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 24 | - return; |
|
| 24 | + return; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
@@ -29,29 +29,29 @@ discard block |
||
| 29 | 29 | * Demander à mettre à jour la base de données |
| 30 | 30 | */ |
| 31 | 31 | function exec_demande_mise_a_jour_dist() { |
| 32 | - // on fait la verif du path avant tout, |
|
| 33 | - // et l'installation des qu'on est dans la colonne principale |
|
| 34 | - // si jamais la liste des plugins actifs change, il faut faire un refresh du hit |
|
| 35 | - // pour etre sur que les bons fichiers seront charges lors de l'install |
|
| 36 | - include_spip('inc/plugin'); |
|
| 37 | - if (actualise_plugins_actifs()) { |
|
| 38 | - include_spip('inc/headers'); |
|
| 39 | - redirige_par_entete(self()); |
|
| 40 | - } |
|
| 41 | - |
|
| 42 | - include_spip('inc/presentation'); |
|
| 43 | - include_spip('inc/filtres_boites'); |
|
| 44 | - $commencer_page = charger_fonction('commencer_page', 'inc'); |
|
| 45 | - echo $commencer_page('', '', '', '', true, false, false); |
|
| 46 | - |
|
| 47 | - echo debut_grand_cadre(true); |
|
| 48 | - echo boite_ouvrir(_T('info_message_technique'), 'notice'); |
|
| 49 | - echo "<p>" . _T('info_procedure_maj_version') . "</p>", |
|
| 50 | - "<p>" . _T('info_administrateur_site_01') . "</p>"; |
|
| 51 | - echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire("upgrade", "reinstall=non")); |
|
| 52 | - echo boite_fermer(); |
|
| 53 | - // masquer les erreurs sql sur cette page car proviennent de la base pas a jour ! |
|
| 54 | - echo '<style type="text/css">#debug-nav {display: none;}</style>'; |
|
| 55 | - echo fin_grand_cadre(true); |
|
| 56 | - echo fin_page(); |
|
| 32 | + // on fait la verif du path avant tout, |
|
| 33 | + // et l'installation des qu'on est dans la colonne principale |
|
| 34 | + // si jamais la liste des plugins actifs change, il faut faire un refresh du hit |
|
| 35 | + // pour etre sur que les bons fichiers seront charges lors de l'install |
|
| 36 | + include_spip('inc/plugin'); |
|
| 37 | + if (actualise_plugins_actifs()) { |
|
| 38 | + include_spip('inc/headers'); |
|
| 39 | + redirige_par_entete(self()); |
|
| 40 | + } |
|
| 41 | + |
|
| 42 | + include_spip('inc/presentation'); |
|
| 43 | + include_spip('inc/filtres_boites'); |
|
| 44 | + $commencer_page = charger_fonction('commencer_page', 'inc'); |
|
| 45 | + echo $commencer_page('', '', '', '', true, false, false); |
|
| 46 | + |
|
| 47 | + echo debut_grand_cadre(true); |
|
| 48 | + echo boite_ouvrir(_T('info_message_technique'), 'notice'); |
|
| 49 | + echo "<p>" . _T('info_procedure_maj_version') . "</p>", |
|
| 50 | + "<p>" . _T('info_administrateur_site_01') . "</p>"; |
|
| 51 | + echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire("upgrade", "reinstall=non")); |
|
| 52 | + echo boite_fermer(); |
|
| 53 | + // masquer les erreurs sql sur cette page car proviennent de la base pas a jour ! |
|
| 54 | + echo '<style type="text/css">#debug-nav {display: none;}</style>'; |
|
| 55 | + echo fin_grand_cadre(true); |
|
| 56 | + echo fin_page(); |
|
| 57 | 57 | } |
@@ -46,8 +46,8 @@ |
||
| 46 | 46 | |
| 47 | 47 | echo debut_grand_cadre(true); |
| 48 | 48 | echo boite_ouvrir(_T('info_message_technique'), 'notice'); |
| 49 | - echo "<p>" . _T('info_procedure_maj_version') . "</p>", |
|
| 50 | - "<p>" . _T('info_administrateur_site_01') . "</p>"; |
|
| 49 | + echo "<p>"._T('info_procedure_maj_version')."</p>", |
|
| 50 | + "<p>"._T('info_administrateur_site_01')."</p>"; |
|
| 51 | 51 | echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire("upgrade", "reinstall=non")); |
| 52 | 52 | echo boite_fermer(); |
| 53 | 53 | // masquer les erreurs sql sur cette page car proviennent de la base pas a jour ! |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 26 | - return; |
|
| 26 | + return; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
@@ -31,24 +31,24 @@ discard block |
||
| 31 | 31 | * Réparer la base de données |
| 32 | 32 | */ |
| 33 | 33 | function exec_base_repair_dist() { |
| 34 | - $ok = false; |
|
| 35 | - if (!spip_connect()) { |
|
| 36 | - $message = _T('titre_probleme_technique'); |
|
| 37 | - } else { |
|
| 38 | - $version_sql = sql_version(); |
|
| 39 | - if (!$version_sql) { |
|
| 40 | - $message = _T('avis_erreur_connexion_mysql'); |
|
| 41 | - } else { |
|
| 42 | - $message = _T('texte_requetes_echouent'); |
|
| 43 | - $ok = true; |
|
| 44 | - } |
|
| 45 | - $action = _T('texte_tenter_reparation'); |
|
| 46 | - } |
|
| 47 | - if ($ok) { |
|
| 48 | - $admin = charger_fonction('admin', 'inc'); |
|
| 49 | - echo $admin('repair', $action, $message, true); |
|
| 50 | - } else { |
|
| 51 | - include_spip('inc/minipres'); |
|
| 52 | - echo minipres(_T('titre_reparation'), "<p>$message</p>"); |
|
| 53 | - } |
|
| 34 | + $ok = false; |
|
| 35 | + if (!spip_connect()) { |
|
| 36 | + $message = _T('titre_probleme_technique'); |
|
| 37 | + } else { |
|
| 38 | + $version_sql = sql_version(); |
|
| 39 | + if (!$version_sql) { |
|
| 40 | + $message = _T('avis_erreur_connexion_mysql'); |
|
| 41 | + } else { |
|
| 42 | + $message = _T('texte_requetes_echouent'); |
|
| 43 | + $ok = true; |
|
| 44 | + } |
|
| 45 | + $action = _T('texte_tenter_reparation'); |
|
| 46 | + } |
|
| 47 | + if ($ok) { |
|
| 48 | + $admin = charger_fonction('admin', 'inc'); |
|
| 49 | + echo $admin('repair', $action, $message, true); |
|
| 50 | + } else { |
|
| 51 | + include_spip('inc/minipres'); |
|
| 52 | + echo minipres(_T('titre_reparation'), "<p>$message</p>"); |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 24 | - return; |
|
| 24 | + return; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
@@ -29,15 +29,15 @@ discard block |
||
| 29 | 29 | $GLOBALS['delais'] = 0;// pas de cache ! |
| 30 | 30 | // Securite |
| 31 | 31 | if (strstr($fond, '/')) { |
| 32 | - if (!include_spip('inc/autoriser') |
|
| 33 | - or !autoriser('webmestre') |
|
| 34 | - ) { |
|
| 35 | - include_spip('inc/minipres'); |
|
| 36 | - echo minipres(); |
|
| 37 | - exit; |
|
| 38 | - } |
|
| 32 | + if (!include_spip('inc/autoriser') |
|
| 33 | + or !autoriser('webmestre') |
|
| 34 | + ) { |
|
| 35 | + include_spip('inc/minipres'); |
|
| 36 | + echo minipres(); |
|
| 37 | + exit; |
|
| 38 | + } |
|
| 39 | 39 | } else { |
| 40 | - $fond = "prive/squelettes/$fond"; |
|
| 40 | + $fond = "prive/squelettes/$fond"; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | // quelques inclusions et ini prealables |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | * @todo supprimer cette fonction vide ? |
| 50 | 50 | **/ |
| 51 | 51 | function shutdown_error() { |
| 52 | - // si on arrive ici avec un tampon non ferme : erreur fatale |
|
| 53 | - /* if (ob_get_level()){ |
|
| 52 | + // si on arrive ici avec un tampon non ferme : erreur fatale |
|
| 53 | + /* if (ob_get_level()){ |
|
| 54 | 54 | // envoyer tous les tampons |
| 55 | 55 | while (ob_get_level()) |
| 56 | 56 | ob_end_flush(); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | $fond = _request('exec'); |
| 29 | -$GLOBALS['delais'] = 0;// pas de cache ! |
|
| 29 | +$GLOBALS['delais'] = 0; // pas de cache ! |
|
| 30 | 30 | // Securite |
| 31 | 31 | if (strstr($fond, '/')) { |
| 32 | 32 | if (!include_spip('inc/autoriser') |