Fix: Plus de plantage si le module ne definie pas la tableau des boxes

This commit is contained in:
Laurent Destailleur 2006-04-22 00:12:11 +00:00
parent 831ca9eade
commit 48ad5fd666
2 changed files with 43 additions and 34 deletions

View File

@ -365,6 +365,8 @@ class DolibarrModules
{ {
$err=0; $err=0;
if (is_array($this->boxes))
{
foreach ($this->boxes as $key => $value) foreach ($this->boxes as $key => $value)
{ {
$titre = $this->boxes[$key][0]; $titre = $this->boxes[$key][0];
@ -390,6 +392,7 @@ class DolibarrModules
$err++; $err++;
} }
} }
}
return $err; return $err;
} }
@ -403,6 +406,8 @@ class DolibarrModules
{ {
$err=0; $err=0;
if (is_array($this->boxes))
{
foreach ($this->boxes as $key => $value) foreach ($this->boxes as $key => $value)
{ {
$titre = $this->boxes[$key][0]; $titre = $this->boxes[$key][0];
@ -414,6 +419,7 @@ class DolibarrModules
$err++; $err++;
} }
} }
}
return $err; return $err;
} }

View File

@ -72,6 +72,9 @@ class modBoutique extends DolibarrModules
// Constantes // Constantes
$this->const = array(); $this->const = array();
// Boites
$this->boxes = array();
// Permissions // Permissions
$this->rights = array(); $this->rights = array();
$this->rights_class = 'boutique'; $this->rights_class = 'boutique';