From 78b26e289044f8a3ee6ae025b4e98afc87f668da Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Thu, 10 Mar 2005 19:43:31 +0000
Subject: [PATCH] =?UTF-8?q?Avec=20ceci=20plus=20l'envoi=20pr=C3=A9c=C3=A9d?=
 =?UTF-8?q?ent=20(qui=20aurait=20du=20se=20limiter=20=C3=A0=20messagerie.p?=
 =?UTF-8?q?hp3)=20correction=20de=20certains=20mauvais=20lien=20dans=20l'a?=
 =?UTF-8?q?rm=C3=A9e=20de=20boutons,=20et=20rationnalisation=20des=20argum?=
 =?UTF-8?q?ents=20des=20fonctions=20pour=20permettre=20des=20appels=20ext?=
 =?UTF-8?q?=C3=A9rieurs?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 dist/login.html           |  2 +-
 ecrire/calendrier.php3    | 10 +---------
 ecrire/inc_calendrier.php | 13 +++++++++++--
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/dist/login.html b/dist/login.html
index 8efaa9c093..4edf520c0b 100644
--- a/dist/login.html
+++ b/dist/login.html
@@ -28,7 +28,7 @@
 	target="spip_pass" 
 	onclick="javascript:window.open(this.href, 'spip_pass', 'scrollbars=yes, resizable=yes, width=480, height=280'); return false;"><:login_motpasseoublie:></a>&#93;
 
-&#91;<a href='#URL_SITE_SPIP'><:login_retoursitepublic:></a>&#93
+&#91;<a href='#URL_SITE_SPIP'><:login_retoursitepublic:></a>&#93;
 
 </div>
 
diff --git a/ecrire/calendrier.php3 b/ecrire/calendrier.php3
index 2b5c482f9d..413b86ce1a 100644
--- a/ecrire/calendrier.php3
+++ b/ecrire/calendrier.php3
@@ -58,15 +58,7 @@ if (!_DIR_RESTREINT)
   debut_page($titre,  "redacteurs", "calendrier");
  else debut_html($titre);
 
-$f = 'http_calendrier_init_' . $type;
-echo $f($date, $echelle, $partie_cal, $GLOBALS['PHP_SELF']);
+echo http_calendrier_init($date, $type);
 
 if (!_DIR_RESTREINT) fin_page(); else 	echo "</body></html>\n";
-
-// partie_cal est utilisee dans:
-// calendrier_navication navi_jour navi_sem 
-// calendrier_mois   calendrier_jour
-
-
-// calendrier_suite_heures
 ?>
diff --git a/ecrire/inc_calendrier.php b/ecrire/inc_calendrier.php
index 239c1952ef..4b5f5c2bae 100644
--- a/ecrire/inc_calendrier.php
+++ b/ecrire/inc_calendrier.php
@@ -42,6 +42,17 @@ $bleu = http_img_pack("m_envoi_bleu$spip_lang_rtl.gif", 'B', "width='14' height=
 $vert = http_img_pack("m_envoi$spip_lang_rtl.gif", 'V', "width='14' height='7' border='0'");
 $jaune= http_img_pack("m_envoi_jaune$spip_lang_rtl.gif", 'J', "width='14' height='7' border='0'");
 
+function http_calendrier_init($date='', $type='semaine', $echelle='', $partie_cal='', $script='')
+{
+	if (!$date) $date = date("Y-m-d");
+	if (!$script) $script = $GLOBALS['REQUEST_URI']; 
+	$script = http_calendrier_retire_args($script,
+					      array('echelle','jour','mois','annee', 'type'));
+
+	$f = 'http_calendrier_init_' . $type;
+	return $f($date, $echelle, $partie_cal, $script);
+}
+
 // Conversion en HTML d'un tableau de champ ics
 // Le champ URL devient une balise A 
 // 	avec href=URL et clic sur les champs SUMMARY et DESC
@@ -437,8 +448,6 @@ function http_calendrier_mois($mois, $annee, $premier_jour, $dernier_jour, $part
 {
   global $couleur_claire, $couleur_foncee;
 
-	$script = http_calendrier_retire_args($GLOBALS['REQUEST_URI'], 
-					array('echelle','jour','mois','annee', 'type'));
 	$today=getdate(time());
 	$j=$today["mday"];
 	if ($dernier_jour > 31) {
-- 
GitLab