Fix: $i is global

This commit is contained in:
Regis Houssin 2013-03-27 20:42:55 +01:00
parent f27f601a73
commit 55757a6b82
2 changed files with 8 additions and 17 deletions

View File

@ -41,18 +41,9 @@ class box_activity extends ModeleBoxes
var $info_box_head = array(); var $info_box_head = array();
var $info_box_contents = array(); var $info_box_contents = array();
/**
* Constructor
*/
function __construct($db)
{
$this->db = $db;
$this->enabled = 1;
// FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software. // FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software.
// FIXME: Removed number_format (not compatible with all languages) // FIXME: Removed number_format (not compatible with all languages)
// FIXME: Pb into some status // FIXME: Pb into some status
}
/** /**
* Charge les donnees en memoire pour affichage ulterieur * Charge les donnees en memoire pour affichage ulterieur
@ -66,6 +57,7 @@ class box_activity extends ModeleBoxes
$totalMnt = 0; $totalMnt = 0;
$totalnb = 0; $totalnb = 0;
$i = 0;
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -99,7 +91,6 @@ class box_activity extends ModeleBoxes
if ($result) if ($result)
{ {
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0;
while ($i < $num) while ($i < $num)
{ {
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'bill'); $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => 'bill');