From 0694e7f4441886859353b7406c3c784408f8cca2 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Fri, 26 May 2006 14:16:32 +0000 Subject: [PATCH] =?UTF-8?q?cas=20d'un=20champ=20spip=5Farticles.lang=20vid?= =?UTF-8?q?e=20(article=20cr=C3=A9=C3=A9=20par=20un=20script=20incomplet)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/exec/articles.php | 5 +++++ ecrire/exec/naviguer.php | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ecrire/exec/articles.php b/ecrire/exec/articles.php index 47c74a14f6..f674c0336f 100644 --- a/ecrire/exec/articles.php +++ b/ecrire/exec/articles.php @@ -725,6 +725,11 @@ function langues_articles($id_article, $langue_article, $flag_editable, $id_rubr $row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_rubrique")); $langue_parent = $row['lang']; + if (!$langue_parent) + $langue_parent = $GLOBALS['meta']['langue_site']; + if (!$langue_article) + $langue_article = $langue_parent; + debut_cadre_couleur(); echo "<div style='text-align: center;'>"; echo menu_langues('changer_lang', $langue_article, _T('info_multi_cet_article').' ', $langue_parent); diff --git a/ecrire/exec/naviguer.php b/ecrire/exec/naviguer.php index fd0f951ecf..86e25067a9 100644 --- a/ecrire/exec/naviguer.php +++ b/ecrire/exec/naviguer.php @@ -239,7 +239,10 @@ if ($id_rubrique>0 AND $GLOBALS['meta']['multi_rubriques'] == 'oui' AND ($GLOBAL $row = spip_fetch_array(spip_query("SELECT lang FROM spip_rubriques WHERE id_rubrique=$id_parent")); $langue_parent = $row['lang']; } - else $langue_parent = $GLOBALS['meta']['langue_site']; + if (!$langue_parent) + $langue_parent = $GLOBALS['meta']['langue_site']; + if (!$langue_rubrique) + $langue_rubrique = $langue_parent; debut_cadre_enfonce('langues-24.gif'); echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 WIDTH=100% BACKGROUND=''><TR><TD BGCOLOR='#EEEECC' class='serif2'>"; -- GitLab