diff --git a/ecrire/inc_getdocument.php3 b/ecrire/inc_getdocument.php3 index d82ca424186e4ef0e5b3ded7a3d95070ea85c34d..472d1ae2d03fa8c55807be9136549733b2e8f50b 100644 --- a/ecrire/inc_getdocument.php3 +++ b/ecrire/inc_getdocument.php3 @@ -105,6 +105,7 @@ function deplacer_fichier_upload($source, $dest) { // et true si erreur = pas de fichier // pour les autres erreurs affiche le message d'erreur et meurt function check_upload_error($error, $msg='') { + global $spip_lang_right; switch ($error) { case 0: return false; @@ -129,10 +130,16 @@ function check_upload_error($error, $msg='') { spip_log ("erreur upload $error"); include_ecrire('inc_presentation.php3'); - install_debut_html(_T('forum_titre_erreur')); - echo "<p>$msg</p>\n"; - - install_fin_html(_DIR_RESTREINT_ABS . $GLOBALS['redirect']); + install_debut_html($msg); + echo '<form action="' , + _DIR_RESTREINT_ABS, + urldecode($GLOBALS['redirect']), + '"><div align="', + $spip_lang_right, + '"><input type="submit" class="fondl" value="', + _T('ecrire:bouton_suivant'), + ' >>"></div>', + '</form></body></html>'; exit; } diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index a827ab1bd600f0d1547ca63d5f2cfb0c65902c41..a7e0602fd0c7c3411e94c9c1595f0ad21b05865e 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -24,6 +24,7 @@ utiliser_langue_visiteur(); function debut_entete($title, $entete='') { global $flag_preserver; + if (headers_sent()) return; if (!$charset = lire_meta('charset')) $charset = 'utf-8'; if (!$entete) @@ -3412,55 +3413,31 @@ function mySel($varaut,$variable, $option = NULL) { // function install_debut_html($titre = 'AUTO') { - global $spip_lang_rtl; + global $attributes_body, $browser_verifForm; if ($titre=='AUTO') $titre=_T('info_installation_systeme_publication'); echo debut_entete($titre), - "<style type='text/css'> - <!-- - a {text-decoration: none; } - A:Hover {color:#FF9900; text-decoration: underline;} - .forml {width: 100%; background-color: #FFCC66; background-position: center bottom; float: none; color: #000000} - .formo {width: 100%; background-color: #FFF0E0; background-position: center bottom; weight: bold; float: none; color: #000000} - .fondl {background-color: #FFCC66; background-position: center bottom; float: none; color: #000000} - .fondo {background-color: #FFF0E0; background-position: center bottom; float: none; color: #000000} - .fondf {background-color: #FFFFFF; border-style: solid ; border-width: 1; border-color: #E86519; color: #E86519} - .serif { font-family: Georgia, Garamond, Times New Roman, serif; } - --> - </style> - </head> - <body bgcolor='#FFFFFF' text='#000000' link='#E86519' vlink='#6E003A' alink='#FF9900'"; - - if ($spip_lang_rtl) echo " dir='rtl'"; - - echo "><br><br><br> - <center> - <table width='450'> - <tr><td width='450' class='serif'> - <font face='Verdana,Arial,Sans,sans-serif' size='4' color='#970038'><B>$titre</b></font>\n<p>"; -} - -function install_fin_html($suite = '') { - - // bouton retour - global $spip_lang_right; - if ($suite) { - $link = new Link($suite); - echo $link->getForm(); - echo "<DIV align='$spip_lang_right'>" - . "<INPUT TYPE='submit' CLASS='fondl' VALUE='" - . _T('ecrire:bouton_suivant')." >>'></div>" - . "</FORM>"; - } - - echo ' - </td></tr></table> - </center> - </body> - </html> - '; + '<link rel="stylesheet" type="text/css" href="' . + _DIR_RESTREINT . + 'spip_style.php3?couleur_claire=' . + urlencode('#FFCC66') . + '&couleur_foncee=' . + urlencode('#000000') . + '&left=' . + $GLOBALS['spip_lang_left'] . + "\" > +</head> +<body $attributes_body> +<center><table width='450'><tr><th style='color: #970038; text-align: left'><h3>", + $titre, + "</h3></th></tr><tr><td class='serif'>"; +} + +function install_fin_html() { + + echo '</td></tr></table></body></html>'; } // Voir en ligne, ou apercu, ou rien (renvoie tout le bloc) diff --git a/ecrire/install.php3 b/ecrire/install.php3 index 7c5158c58b3f6ca1ad1d0e2b3ab91327f60bc045..b9f1c205480d9b0cdbf1011e56552c0bd533bfe4 100644 --- a/ecrire/install.php3 +++ b/ecrire/install.php3 @@ -398,7 +398,7 @@ else if ($etape == 3) { echo "<INPUT NAME=\"choix_db\" VALUE=\"new_spip\" TYPE=Radio id='nou'"; if (!$checked) echo " CHECKED"; echo "> <label for='nou'>"._T('info_creer_base')."</label> "; - echo "<INPUT TYPE='text' NAME='table_new' CLASS='fondo' VALUE=\"spip\" SIZE='20'></fieldset><P>"; + echo "<INPUT TYPE='text' NAME='table_new' CLASS='fondl' VALUE=\"spip\" SIZE='20'></fieldset><P>"; echo "<DIV align='$spip_lang_right'><INPUT TYPE='submit' CLASS='fondl' VALUE='"._T('bouton_suivant')." >>'>"; diff --git a/inc-cache.php3 b/inc-cache.php3 index 66fdcae6a3956664ce29c74e61d3b1da022903ec..2aaf4f193035f4719556ede4e974bdcf2cb88b52 100644 --- a/inc-cache.php3 +++ b/inc-cache.php3 @@ -213,24 +213,18 @@ function determiner_cache($delais, &$use_cache, &$chemin_cache) { if (@file_exists($chemin_cache)) $use_cache = 1; // passer outre else { - spip_log("Erreur base de donnees & " + if (!spip_interdire_cache) { + spip_log("Erreur base de donnees & " . "impossible utiliser $chemin_cache"); - if (!$GLOBALS['flag_preserver']) { include_ecrire('inc_presentation.php3'); - if (!headers_sent()) { - install_debut_html(_T('info_travaux_titre')); - echo _T('titre_probleme_technique'); - install_fin_html(); - } - else echo _T('titre_probleme_technique'); - + install_debut_html(_T('info_travaux_titre'));echo _T('titre_probleme_technique');install_fin_html(); } + } // continuer quand meme, ca n'ira pas loin. // mais ne plus rien signaler, ne pas mettre en cache ... - $GLOBALS['flag_preserver'] = true; - define ('spip_interdire_cache', true); - } + $GLOBALS['flag_preserver'] = true; + define ('spip_interdire_cache', true); } // En cas de POST (et si la connexion est ok) supprimer le cache diff --git a/spip_test_dirs.php3 b/spip_test_dirs.php3 index 96f270020acd4299f0046cb904cd65f5be5911ae..1f2f54061938251ab1c217859bf8e5ad8442787c 100644 --- a/spip_test_dirs.php3 +++ b/spip_test_dirs.php3 @@ -69,43 +69,38 @@ while (list(, $my_dir) = each($test_dirs)) { } if ($bad_dirs OR $absent_dirs) { - install_debut_html(); if (!_FILE_CONNECT) { $titre = _T('dirs_preliminaire'); - $continuer = ' '._T('dirs_commencer'); + $continuer = ' '._T('dirs_commencer') . '.'; } else $titre = _T('dirs_probleme_droits'); $bad_url = "spip_test_dirs.php3"; if ($test_dir) $bad_url .= '?test_dir='.$test_dir; - echo "<FONT FACE=\"Verdana,Arial,Helvetica,sans-serif\" SIZE=3>$titre</FONT>\n<p>"; - echo "<div align='right'>". menu_langues('var_lang_ecrire')."</div>\n"; + $res = "<div align='right'>". menu_langues('var_lang_ecrire')."</div>\n"; if ($bad_dirs) { - echo "<p>"; - echo _T('dirs_repertoires_suivants', - array('bad_dirs' => join(" ", $bad_dirs))); - echo "<B>". _T('login_recharger')."</b>"; + $res .= + _T('dirs_repertoires_suivants', + array('bad_dirs' => join(" ", $bad_dirs))) . + "<b>". _T('login_recharger')."</b>."; } if ($absent_dirs) { - echo "<p>"; - echo _T('dirs_repertoires_absents', - array('bad_dirs' => join(" ", $absent_dirs))); - echo "<B>". _T('login_recharger')."</b>"; + $res .= + _T('dirs_repertoires_absents', + array('bad_dirs' => join(" ", $absent_dirs))) . + "<b>". _T('login_recharger')."</b>."; } - echo $continuer.'. '; - echo aide ("install0"); - echo "<p>"; - - echo "<FORM ACTION='$bad_urls' METHOD='GET'>\n"; - echo "<DIV align='right'><INPUT TYPE='submit' CLASS='fondl' VALUE='". _T('login_recharger')."'></DIV>"; - echo "</FORM>"; - - install_fin_html(); + $res = "<p>" . $continuer . $res . aide ("install0") . "</p>" . + "<FORM ACTION='$bad_urls' METHOD='GET'>\n" . + "<DIV align='right'><INPUT TYPE='submit' CLASS='fondl' VALUE='". + _T('login_recharger')."'></DIV>" . + "</FORM>"; + install_debut_html($titre);echo $res; install_fin_html(); } else { if (!_FILE_CONNECT)