Fix: La couleur de fond des graphs n'etait pas prise depuis le theme.

This commit is contained in:
Laurent Destailleur 2005-07-16 14:57:49 +00:00
parent 0812a19c5c
commit eab6fd7f52

View File

@ -49,23 +49,23 @@ class Stats
* \brief Renvoie le nombre de proposition par mois pour une année donnée
*
*/
function _getNbByMonth($year, $sql)
{
$result = array();
if ($this->db->query($sql))
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows();
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$row = $this->db->fetch_row($i);
$row = $this->db->fetch_row($resql);
$j = $row[0] * 1;
$result[$j] = $row[1];
$i++;
}
$this->db->free();
$this->db->free($resql);
}
for ($i = 1 ; $i < 13 ; $i++)
@ -77,7 +77,7 @@ class Stats
for ($i = 1 ; $i < 13 ; $i++)
{
$data[$i-1] = array(strftime("%b",mktime(12,12,12,$i,1,$year)), $res[$i]);
$data[$i-1] = array(ucfirst(substr(strftime("%b",mktime(12,12,12,$i,1,$year)),0,3)), $res[$i]);
}
return $data;
@ -88,7 +88,6 @@ class Stats
* \brief Renvoie le nombre d'element par année
*
*/
function _getNbByYear($sql)
{
$result = array();
@ -101,13 +100,16 @@ class Stats
{
$row = $this->db->fetch_row($i);
$result[$i] = $row;
$i++;
}
$this->db->free();
}
else {
dolibarr_print_error($this->db);
}
return $result;
}
/**
* \brief Renvoie le nombre d'element par mois pour une année donnée
*