Fix regression

This commit is contained in:
Laurent Destailleur 2020-04-25 03:38:12 +02:00
parent 4dc8e59e7f
commit 99f445962b
2 changed files with 6 additions and 6 deletions

View File

@ -292,19 +292,19 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
if ($conditions[$val]) if ($conditions[$val])
{ {
$boxstatItem = ''; $boxstatItem = '';
$classe = $classes[$val]; $class = $classes[$val];
// Search in cache if load_state_board is already realized // Search in cache if load_state_board is already realized
if (!isset($boardloaded[$classe]) || !is_object($boardloaded[$classe])) if (!isset($boardloaded[$class]) || !is_object($boardloaded[$class]))
{ {
include_once $includes[$val]; // Loading a class cost around 1Mb include_once $includes[$val]; // Loading a class cost around 1Mb
$board = new $classe($db); $board = new $class($db);
$board->load_state_board($user); $board->load_state_board($user);
$boardloaded[$classe] = $board; $boardloaded[$class] = $board;
} }
else else
{ {
$board = $boardloaded[$classe]; $board = $boardloaded[$class];
} }
$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);

View File

@ -2465,7 +2465,7 @@ class SupplierProposal extends CommonObject
// This assignment in condition is not a bug. It allows walking the results. // This assignment in condition is not a bug. It allows walking the results.
while ($obj = $this->db->fetch_object($resql)) while ($obj = $this->db->fetch_object($resql))
{ {
$this->nb["askprice"] = $obj->nb; $this->nb["supplier_proposals"] = $obj->nb;
} }
$this->db->free($resql); $this->db->free($resql);
return 1; return 1;