// Some fix on objectModel children classes (fields not valid, etc.)

This commit is contained in:
rMalie
2011-11-09 12:16:37 +00:00
parent 88f701bf0a
commit 201cb34a4d
13 changed files with 121 additions and 102 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ class TabCore extends ObjectModel
/** @var integer position */
public $position;
protected $fieldsRequired = array('class_name', 'position');
protected $fieldsRequired = array('class_name');
protected $fieldsSize = array('class_name' => 64, 'module' => 64);
protected $fieldsValidate = array(
'id_parent' => 'isInt',
@@ -105,7 +105,7 @@ class TabCore extends ObjectModel
{
if (!$context)
$context = Context::getContext();
if (!$context->employee->id_profile)
if (!$context->employee || !$context->employee->id_profile)
return false;
/* Profile selection */
$profiles = Db::getInstance()->executeS('