From aa87ed8e0d4ce7ddf6f568a6951e2913fdccace7 Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Thu, 14 Dec 2006 13:45:02 +0000 Subject: [PATCH] =?UTF-8?q?Placer=20le=20nom=20du=20r=C3=A9pertoire=20?= =?UTF-8?q?=C3=A0=20la=20fois=20par=20PHP=20et=20par=20JS=20au=20cas=20o?= =?UTF-8?q?=C3=B9=20celui-ci=20ne=20marcherait=20pas.=20Et=20un=20peu=20de?= =?UTF-8?q?=20conformit=C3=A9=20XHTML=20grace=20au=20mini-validateur=20qui?= =?UTF-8?q?=20lui)=20m=C3=AAme=20am=C3=A9liore=20sa=20pr=C3=A9sentation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/exec/admin_effacer.php | 18 +++++++-------- ecrire/exec/admin_tech.php | 8 +++---- ecrire/exec/configuration.php | 43 +++++++++++++++++------------------ ecrire/inc/admin.php | 10 +++++--- ecrire/inc/presentation.php | 2 +- ecrire/inc/validateur.php | 13 +++++++---- 6 files changed, 50 insertions(+), 44 deletions(-) diff --git a/ecrire/exec/admin_effacer.php b/ecrire/exec/admin_effacer.php index 18864438c4..4a540cf5f6 100644 --- a/ecrire/exec/admin_effacer.php +++ b/ecrire/exec/admin_effacer.php @@ -23,7 +23,7 @@ $commencer_page = charger_fonction('commencer_page', 'inc'); echo $commencer_page(_T('titre_page_admin_effacer'), "configuration", "base"); -echo "<br><br><br>"; +echo "\n<br /><br /><br />"; gros_titre(_T('titre_admin_effacer')); echo barre_onglets("administration", "effacer"); @@ -52,23 +52,23 @@ if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) { debut_cadre_relief(); -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=8 WIDTH=\"100%\">"; +echo "\n<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='8' WIDTH=\"100%\">"; echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND=''><B>"; -echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#FFFFFF'>"; +echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE='3' COLOR='#FFFFFF'>"; echo _T('texte_effacer_base')."</FONT></B></TD></TR>"; echo "<tr><td class='serif'>"; -echo "\n<p align='justify'>"; -echo '<img src="' . _DIR_IMG_PACK . 'warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right">'; +echo "\n<p align='justify'>\n"; +echo '<img src="' . _DIR_IMG_PACK . 'warning.gif" alt="'._T('info_avertissement').'" width="48" height="48" align="right" />'; echo _T('texte_admin_effacer_01'); -echo "<CENTER>"; +echo "\n<CENTER>"; echo debut_boite_alerte(); echo "\n<div class='serif'>"; -echo "\n<p align='justify'><b>"._T('avis_suppression_base')." !</b>"; +echo "\n<b>"._T('avis_suppression_base')." !</b>"; echo generer_url_post_ecrire("delete_all", "reinstall=non"), "\n<div align='right'>", @@ -79,14 +79,14 @@ echo "\n<p align='justify'><b>"._T('avis_suppression_base')." !</b>"; echo fin_boite_alerte(); -echo "</CENTER>"; +echo "</CENTER></p>"; echo "</td></tr>"; echo "</TABLE>"; fin_cadre_relief(); -echo "<BR>"; +echo "<br />"; diff --git a/ecrire/exec/admin_tech.php b/ecrire/exec/admin_tech.php index 550bf461b8..6a0436f6f8 100644 --- a/ecrire/exec/admin_tech.php +++ b/ecrire/exec/admin_tech.php @@ -68,7 +68,7 @@ function exec_admin_tech_dist() $dir_img = _DIR_IMG; echo "<table border='0' cellspacing='0' cellpadding='5' width=\"100%\">", - "<tr><td bgcolor='", $couleur_foncee, "' background=''><b>", + "<tr><td bgcolor='", $couleur_foncee, "'><b>", "<font face='Verdana,Arial,Sans,sans-serif' size='3' color='#FFFFFF'>", _T('texte_sauvegarde'), "</font></b></td></tr><tr><td class='serif'>", @@ -129,7 +129,7 @@ echo "</table>"; } echo "\n<table border='0' cellspacing='1' cellpadding='8' width=\"100%\">", - "<tr><td bgcolor='#eeeecc' background=''><b>", + "<tr><td bgcolor='#eeeecc'><b>", "<font face='Verdana,Arial,Sans,sans-serif' size='3' color='#000000'>", _T('texte_restaurer_base')."</font></b></td></tr>", "<tr><td class='serif'>\n", @@ -168,8 +168,8 @@ if ($options == "avancees" AND $connect_toutes_rubriques) { $res = spip_mysql_version(); if ($res >= '3.23.14') { echo "<table border='0' cellspacing='1' cellpadding='8' width=\"100%\">"; - echo "<tr><td bgcolor='#eeeecc' background=''><b>"; - echo "<font face='Verdana,Arial,Sans,sans-serif' size='3' COLOR='#000000'>"; + echo "<tr><td bgcolor='#eeeecc'><b>"; + echo "<font face='Verdana,Arial,Sans,sans-serif' size='3' color='#000000'>"; echo _T('texte_recuperer_base'), "</font></b></td></tr>", "<tr><td class='serif'>", diff --git a/ecrire/exec/configuration.php b/ecrire/exec/configuration.php index ba15209592..caf1ee73d5 100644 --- a/ecrire/exec/configuration.php +++ b/ecrire/exec/configuration.php @@ -54,7 +54,7 @@ pipeline('exec_init',array('args'=>array('exec'=>'configuration'),'data'=>'')); $commencer_page = charger_fonction('commencer_page', 'inc'); echo $commencer_page(_T('titre_page_configuration'), "configuration", "configuration"); -echo "<br><br><br>"; +echo "<br /><br /><br />"; gros_titre(_T('titre_configuration')); echo barre_onglets("configuration", "contenu"); @@ -326,7 +326,7 @@ if ($options == "avancees") { echo "<p />"; debut_cadre_relief("", false, "", _T('titre_config_groupe_mots_cles')); - echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; + echo "<table BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD class='verdana2'>"; echo _T('texte_config_groupe_mots_cles'); echo "</TD></TR>"; @@ -342,7 +342,7 @@ if ($options == "avancees") { if ($forums_publics != "non"){ echo "<p />"; debut_cadre_relief("", false, "", _T('titre_mots_cles_dans_forum')); - echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; + echo "<table BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD class='verdana2'>"; echo _T('texte_mots_cles_dans_forum'); echo "</TD></TR>"; @@ -352,7 +352,6 @@ if ($options == "avancees") { echo afficher_choix('mots_cles_forums', $mots_cles_forums, array('oui' => _T('item_ajout_mots_cles'), 'non' => _T('item_non_ajout_mots_cles'))); - echo "</FONT>"; echo "</TD></TR>"; echo "</table>"; fin_cadre_relief(); @@ -363,7 +362,7 @@ if ($options == "avancees") { echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><td style='text-align:$spip_lang_right;'>"; echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo' />"; - echo "</TD></TR>"; + echo "</td></TR>"; echo "</TABLE>\n"; fin_cadre_trait_couleur(); @@ -384,7 +383,7 @@ $proposer_sites = $GLOBALS['meta']["proposer_sites"]; $visiter_sites = $GLOBALS['meta']["visiter_sites"]; $moderation_sites = $GLOBALS['meta']["moderation_sites"]; -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; +echo "\n<table BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif' ALIGN='$spip_lang_left' class='verdana2'>"; @@ -405,15 +404,15 @@ else $style = "display: none;"; // echo "<p />"; debut_cadre_relief(); - echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; + echo "\n<table BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD BACKGROUND='" . _DIR_IMG_PACK . "rien.gif'>"; - echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=2 COLOR='#000000'>"; + echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE='2' COLOR='#000000'>"; echo _T('info_question_proposer_site'); - echo "<center><SELECT NAME='proposer_sites' CLASS='fondo' SIZE=1>\n"; - echo "<OPTION".mySel('0',$proposer_sites).">"._T('item_choix_administrateurs')."\n"; - echo "<OPTION".mySel('1',$proposer_sites).">"._T('item_choix_redacteurs')."\n"; - echo "<OPTION".mySel('2',$proposer_sites).">"._T('item_choix_visiteurs')."\n"; - echo "</SELECT></center><P>\n"; + echo "<center><SELECT NAME='proposer_sites' CLASS='fondo' SIZE='1'>\n"; + echo "<OPTION".mySel('0',$proposer_sites).">"._T('item_choix_administrateurs')."</OPTION>\n"; + echo "<OPTION".mySel('1',$proposer_sites).">"._T('item_choix_redacteurs')."</OPTION>\n"; + echo "<OPTION".mySel('2',$proposer_sites).">"._T('item_choix_visiteurs')."</OPTION>\n"; + echo "</SELECT></center><br />\n"; echo "</FONT>"; echo "</TD></TR></table>"; fin_cadre_relief(); @@ -422,7 +421,7 @@ else $style = "display: none;"; if ($options == "avancees") { debut_cadre_relief("", false, "", _T('titre_syndication').aide ("rubsyn")); - echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; + echo "\n<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; // // Reglage de la syndication // @@ -458,7 +457,7 @@ else $style = "display: none;"; if ($activer_moteur == "oui") { echo "<p><hr><p align='$spip_lang_left'>"; echo _T('texte_utilisation_moteur_syndiques')." "; - echo "<blockquote><i>"._T('texte_utilisation_moteur_syndiques_2')."</i></blockquote><p>"; + echo "<blockquote><i>"._T('texte_utilisation_moteur_syndiques_2')."</i></blockquote><br />"; echo afficher_choix('visiter_sites', $visiter_sites, array('non' => _T('item_limiter_recherche'), @@ -481,7 +480,7 @@ else $style = "display: none;"; debut_cadre_relief("feed.png", false, "", _T('ical_titre_rss')); -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; +echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD class='verdana2'>"; echo _T('info_syndication_integrale_1', @@ -496,7 +495,7 @@ echo "<TR>"; echo "<TD align='$spip_lang_left' class='verdana2'>"; echo afficher_choix('syndication_integrale', $GLOBALS['meta']["syndication_integrale"], array('oui' => _T('item_autoriser_syndication_integrale'), - 'non' => _T('item_non_autoriser_syndication_integrale')), "<br>"); + 'non' => _T('item_non_autoriser_syndication_integrale')), "<br />"); echo "</TD></TR>"; echo "</TABLE>\n"; @@ -506,7 +505,7 @@ echo "<p>"; -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; +echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><td style='text-align:$spip_lang_right;'>"; echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo' />"; echo "</TD></TR>"; @@ -526,7 +525,7 @@ debut_cadre_trait_couleur("doc-24.gif", false, "", _T('titre_documents_joints')) $documents_rubrique = $GLOBALS['meta']["documents_rubrique"]; $documents_article = $GLOBALS['meta']["documents_article"]; -echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">"; +echo "<TABLE BORDER='0' CELLSPACING='1' CELLPADDING='3' WIDTH=\"100%\">"; echo "<TR><TD class='verdana2'>"; echo _T('texte_documents_joints'); @@ -537,11 +536,11 @@ echo "<TR>"; echo "<TD align='$spip_lang_left' class='verdana2'>"; echo afficher_choix('documents_article', $documents_article, array('oui' => _T('item_autoriser_documents_joints'), - 'non' => _T('item_non_autoriser_documents_joints')), "<br>"); -echo "<br><br>\n"; + 'non' => _T('item_non_autoriser_documents_joints')), "<br />"); +echo "<br /><br />\n"; echo afficher_choix('documents_rubrique', $documents_rubrique, array('oui' => _T('item_autoriser_documents_joints_rubriques'), - 'non' => _T('item_non_autoriser_documents_joints_rubriques')), "<br>"); + 'non' => _T('item_non_autoriser_documents_joints_rubriques')), "<br />"); echo "</FONT>"; echo "</TD></TR>"; diff --git a/ecrire/inc/admin.php b/ecrire/inc/admin.php index 2740f5afa8..c1b170edc2 100644 --- a/ecrire/inc/admin.php +++ b/ecrire/inc/admin.php @@ -51,16 +51,20 @@ function debut_admin($script, $action, $commentaire='') { array( 'fichier' => array( 'label' => _T('info_creer_repertoire'), - 'valeur' => '' + 'valeur' => $signal )), ('<br />' . _T('info_creer_repertoire_2', array('repertoire' => joli_repertoire($dir))) . bouton_suivant(_T('recharger_page')))) . "</form>"; + // code volontairement tordu: + // provoquer la copie dans le presse papier du nom du repertoire + // en remettant a vide le champ pour que ça marche aussi en cas + // de JavaScript inactif. echo minipres(_T('info_action', array('action' => $action)), - $form, - " onload='barre_inserer(\"$signal\", document.forms[0].fichier)'"); + $form +, " onload='document.forms[0].fichier.value=\"\";barre_inserer(\"$signal\", document.forms[0].fichier)'"); exit; } diff --git a/ecrire/inc/presentation.php b/ecrire/inc/presentation.php index dd5f0859df..6924c9295c 100644 --- a/ecrire/inc/presentation.php +++ b/ecrire/inc/presentation.php @@ -235,7 +235,7 @@ function debut_boite_alerte() { // http://doc.spip.org/@fin_boite_alerte function fin_boite_alerte() { - return "</td></tr></table></td></tr></table>"; + return "</td></tr></table></td></tr></table></p>"; } diff --git a/ecrire/inc/validateur.php b/ecrire/inc/validateur.php index 8e2c94ea68..9ec520684a 100644 --- a/ecrire/inc/validateur.php +++ b/ecrire/inc/validateur.php @@ -67,16 +67,18 @@ function inc_validateur_dist($data) function validerElement($parser, $name) { - global $phraseur_xml; + global $phraseur_xml; + + if (!$phraseur_xml->elements) return; - if ($phraseur_xml->elements - AND !in_array($name, $phraseur_xml->elements)) + if (!in_array($name, $phraseur_xml->elements)) $phraseur_xml->err[]= $name . ' : ' . _L('balise inconnue ') . _L('ligne ') - . xml_get_current_line_number($parser); + . xml_get_current_line_number($parser) + . '<br />'; } @@ -92,7 +94,8 @@ function validerAttribut($parser, $name, $val, $bal) . _L('attribut inconnu de ') . $bal . _L(' ligne ') - . xml_get_current_line_number($parser); + . xml_get_current_line_number($parser) + . '<br />'; } -- GitLab