From 37e5b6eb90cba085327f30c7ff141a15d62a0ed6 Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Thu, 14 Dec 2006 20:51:06 +0000
Subject: [PATCH] Petouille sur le calendier public sans argument (Ventre
 Arnaud)

---
 ecrire/inc/filtres.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ecrire/inc/filtres.php b/ecrire/inc/filtres.php
index 5bbe7df7ad..f8947608b6 100644
--- a/ecrire/inc/filtres.php
+++ b/ecrire/inc/filtres.php
@@ -960,9 +960,14 @@ function agenda_affiche($i)
 		}
 	}
 	$d = array_keys($evt);
-	$mindate = date_ical(_request('jour')."/"._request('mois')."/"._request('annee'));
 	if (count($d))
 		$mindate = min($d);
+	else {
+	  $mindate = (_request('jour')."/"._request('mois')."/"._request('annee'));
+	  if ($mindate !='//')
+	  	$mindate = date_ical($mindate);
+	  else  $mindate = date("Ymd\THis");
+	}
 	$start = strtotime($mindate);
 	if ($type != 'periode')
 		$evt = array('', $evt);
-- 
GitLab