// Fix definition on Alias and Tag objects

This commit is contained in:
rMalie
2011-12-21 20:28:31 +00:00
parent 4021101982
commit 3d9e606c0c
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -46,6 +46,9 @@ class AliasCore extends ObjectModel
public function __construct($id = NULL, $alias = NULL, $search = NULL, $id_lang = NULL)
{
$this->def = self::getDefinition($this);
$this->setDefinitionRetrocompatibility();
if ($id)
parent::__construct($id);
else if ($alias && Validate::isValidSearch($alias))
+3 -3
View File
@@ -54,13 +54,13 @@ class TagCore extends ObjectModel
public function __construct($id = null, $name = null, $id_lang = null)
{
$this->def = self::getDefinition($this);
$this->setDefinitionRetrocompatibility();
if ($id)
parent::__construct($id);
else if ($name && Validate::isGenericName($name) && $id_lang && Validate::isUnsignedId($id_lang))
{
$this->def = self::getDefinition($this);
$this->setDefinitionRetrocompatibility();
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('
SELECT *
FROM `'._DB_PREFIX_.'tag` t