Better var name
This commit is contained in:
parent
b14a16a119
commit
ae81bbac93
@ -6284,11 +6284,12 @@ abstract class CommonObject
|
||||
if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue;
|
||||
|
||||
// @TODO Add test also on 'enabled' (different than 'list' that is 'visibility')
|
||||
|
||||
$enabled = 1;
|
||||
if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
||||
|
||||
$visibility = 1;
|
||||
if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key]))
|
||||
{
|
||||
$enabled = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1);
|
||||
$visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1);
|
||||
}
|
||||
|
||||
$perms = 1;
|
||||
@ -6297,7 +6298,7 @@ abstract class CommonObject
|
||||
$perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1);
|
||||
}
|
||||
|
||||
if (($mode == 'create' || $mode == 'edit') && abs($enabled) != 1 && abs($enabled) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
||||
if (($mode == 'create' || $mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list
|
||||
if (empty($perms)) continue;
|
||||
|
||||
// Load language if required
|
||||
|
||||
Loading…
Reference in New Issue
Block a user