From 71225793dd9483f572cc2f42288253647b735418 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Wed, 25 May 2005 12:44:32 +0000 Subject: [PATCH] fix bug graph par promo casse pour les promos avec aucune inscription depuis un an git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-658 --- htdocs/stats/graph_promo.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/stats/graph_promo.php b/htdocs/stats/graph_promo.php index 03fc4ac..88616c6 100644 --- a/htdocs/stats/graph_promo.php +++ b/htdocs/stats/graph_promo.php @@ -27,6 +27,8 @@ $promo = Env::getInt('promo', Session::getInt('promo')); //nombre de jours sur le graph $JOURS=364; define('DUREEJOUR',24*3600); +$res = $globals->xdb->query("SELECT min(TO_DAYS(date_ins)-TO_DAYS(now())) FROM auth_user_md5 WHERE promo = {?} AND perms IN ('admin', 'user')", $promo); +$JOURS = -$res->fetchOneCell(); //recupere le nombre d'inscriptions par jour sur la plage concernée $res = $globals->xdb->iterRow( -- 2.1.4