From c28cf9bceda872b414c2206b2043e9373e6f2553 Mon Sep 17 00:00:00 2001
From: ARNO* <arno@rezo.net>
Date: Thu, 27 Nov 2003 16:58:58 +0000
Subject: [PATCH] =?UTF-8?q?L'export=20calendrier=20public=20devient=20un?=
 =?UTF-8?q?=20squelette=20normal.=20De=20cette=20fa=C2=8Don=20on=20peut=20?=
 =?UTF-8?q?le=20reconfigurer=20si=20n=C2=8Ecessaire.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/synchro.php3 |  4 ++--
 spip_cal.php3       | 43 -------------------------------------------
 2 files changed, 2 insertions(+), 45 deletions(-)

diff --git a/ecrire/synchro.php3 b/ecrire/synchro.php3
index 561ba88c05..b330e33d66 100644
--- a/ecrire/synchro.php3
+++ b/ecrire/synchro.php3
@@ -85,12 +85,12 @@ debut_droite();
 		echo "<div>&nbsp;</div>";
 		
 		echo "<div style='float: left; width: 200px;'>";
-			icone_horizontale (_T("calendrier_synchro_lien"), "$adresse_site/spip_cal.php3?type=public", "calendrier-24.gif");
+			icone_horizontale (_T("calendrier_synchro_lien"), "$adresse_site/ical.php3", "calendrier-24.gif");
 		echo "</div>";
 	
 		echo "<div style='float: right; width: 200px;'>";
 			$webcal = ereg_replace("http.?://", "webcal://", $adresse_site);
-			icone_horizontale (_T("calendrier_synchro_sync"), "$webcal/spip_cal.php3?type=public", "calendrier-24.gif");
+			icone_horizontale (_T("calendrier_synchro_sync"), "$webcal/ical.php3", "calendrier-24.gif");
 		echo "</div>";
 		echo fin_cadre_enfonce();
 
diff --git a/spip_cal.php3 b/spip_cal.php3
index 9577266912..673e1fffce 100644
--- a/spip_cal.php3
+++ b/spip_cal.php3
@@ -46,49 +46,6 @@ if (verifier_low_sec($id_auteur, $cle, 'ical')) {
 @header ("content-type:text/calendar");
 
 
-if ($type == "public") {
-	ligne ("BEGIN:VCALENDAR");
-	ligne ("CALSCALE:GREGORIAN");
-	ligne ("X-WR-CALNAME;VALUE=TEXT:$nom_site");
-	ligne ("X-WR-RELCALID:$adresse_site");
-
-	// Articles et breves publies
-	$result_articles = spip_query("SELECT id_article, titre, date FROM spip_articles WHERE statut = 'publie'");
-	while($row=spip_fetch_array($result_articles)){
-		$id_article=$row['id_article'];
-		$titre = filtrer_ical($row['titre']." ("._T('info_article_publie').")");
-		$date_heure = $row['date'];
-		ligne ("BEGIN:VEVENT");
-		ligne ("SUMMARY:$titre [$nom_site]");
-		ligne ("UID:article$id_article @ $adresse_site");
-				ligne ("DTSTAMP:".date_ical($date_heure));
-				ligne ("DTSTART:".date_ical($date_heure));
-				ligne ("DTEND:".date_ical($date_heure, 60));
-		ligne ("CATEGORIES:".filtrer_ical(_T('titre_breve_publiee')));
-		ligne("URL:$adresse_site/spip_redirect.php3?id_article=$id_article");
-		ligne("STATUS:CONFIRMED");
-		ligne ("END:VEVENT");
-	}
-	$result_articles = spip_query("SELECT id_breve, titre, date_heure FROM spip_breves WHERE statut = 'publie'");
-	while($row=spip_fetch_array($result_articles)){
-		$id_breve=$row['id_breve'];
-		$titre = filtrer_ical($row['titre']." ("._T('titre_breve_publiee').")");
-		$date_heure = $row['date_heure'];
-		ligne ("BEGIN:VEVENT");
-		ligne ("SUMMARY:$titre [$nom_site]");
-		ligne ("UID:breve$id_breve @ $adresse_site");
-				ligne ("DTSTAMP:".date_ical($date_heure));
-				ligne ("DTSTART:".date_ical($date_heure));
-				ligne ("DTEND:".date_ical($date_heure, 60));
-		ligne ("CATEGORIES:".filtrer_ical(_T('titre_breve_publiee')));
-		ligne("URL:$adresse_site/spip_redirect.php3?id_breve=$id_breve");
-		ligne("STATUS:CONFIRMED");
-		ligne ("END:VEVENT");
-	}
-	ligne ("END:VCALENDAR");
-}
-
-
 
 
 if ($id_utilisateur) {
-- 
GitLab