Fix: current entity by default

Todo: some constant already defined in module ?
This commit is contained in:
Regis Houssin
2010-01-05 17:21:01 +00:00
parent 9e1100ece3
commit dbc211ce3b
5 changed files with 7 additions and 3 deletions

View File

@@ -759,8 +759,7 @@ class DolibarrModules
$val = $this->const[$key][2];
$note = $this->const[$key][3];
$visible= $this->const[$key][4];
$entity = isset($this->const[$key][5])?$this->const[$key][5]:0;
$entity = ((!empty($entity) || $entity == '0')?$entity:$conf->entity);
$entity = isset($this->const[$key][5])?$this->const[$key][5]:$conf->entity;
$sql = "SELECT count(*)";
$sql.= " FROM ".MAIN_DB_PREFIX."const";