From 0521940cb7b2b0ef71c52e009461666994d12662 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sun, 22 Apr 2007 22:28:42 +0000 Subject: [PATCH] Fix stats when there were no new subscription in the given range of dates git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1728 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/stats.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/stats.php b/modules/stats.php index 591d18b..4887934 100644 --- a/modules/stats.php +++ b/modules/stats.php @@ -77,9 +77,8 @@ class StatsModule extends PLModule // la première ligne contient le total des inscrits avant la date de départ (J - $jours) list(,$init_nb) = $res->next(); - $total = $init_nb; - - list($numjour, $nb) = $res->next(); + $total = $init_nb; + $numjour = - $jours - 1; for ($i = -$jours; $i<=0; $i++) { if ($numjour<$i) { @@ -96,6 +95,7 @@ class StatsModule extends PLModule header( "Content-type: image/png"); $delt = ($total - $init_nb)/10; + $delt = $delt ? $delt : 5; $ymin = round($init_nb - $delt,0); $ymax = round($total + $delt,0); -- 2.1.4