More complete dependencies

This commit is contained in:
Laurent Destailleur 2016-03-26 12:26:27 +01:00
parent 1d02f6446f
commit 40e0347bb5
2 changed files with 3 additions and 5 deletions

View File

@ -31,11 +31,10 @@ class box_graph_product_distribution extends ModeleBoxes
var $boxcode="productdistribution"; var $boxcode="productdistribution";
var $boximg="object_product"; var $boximg="object_product";
var $boxlabel="BoxProductDistribution"; var $boxlabel="BoxProductDistribution";
var $depends = array("product|service"); var $depends = array("product|service","facture|propal|commande");
var $db; var $db;
var $param; var $param;
var $enabled=1;
var $info_box_head = array(); var $info_box_head = array();
var $info_box_contents = array(); var $info_box_contents = array();
@ -52,7 +51,6 @@ class box_graph_product_distribution extends ModeleBoxes
global $conf; global $conf;
$this->db=$db; $this->db=$db;
$this->enabled=($conf->facture->enabled || $conf->propal->enabled || $conf->commande->enabled);
} }
/** /**

View File

@ -145,7 +145,7 @@ class InfoBox
if (! empty($conf->$tmpmodule->enabled)) $tmpenabled=1; if (! empty($conf->$tmpmodule->enabled)) $tmpenabled=1;
//print $boxname.'-'.$module.'-module enabled='.(empty($conf->$tmpmodule->enabled)?0:1).'<br>'; //print $boxname.'-'.$module.'-module enabled='.(empty($conf->$tmpmodule->enabled)?0:1).'<br>';
} }
if (empty($tmpenabled)) // We found at least one module required that disabled if (empty($tmpenabled)) // We found at least one module required that is disabled
{ {
$enabled=0; $enabled=0;
break; break;