[*] Classes: ObjectModel::getTranslationsField|Child() is now deprecated, use ObjectModel::getFieldsLang() if need instead
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11256 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+7
-25
@@ -90,19 +90,19 @@ class CategoryCore extends ObjectModel
|
||||
'nleft' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'nright' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'level_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true, 'size' => 1),
|
||||
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true),
|
||||
'id_parent' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'position' => array('type' => self::TYPE_INT),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
|
||||
|
||||
// Lang fields
|
||||
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
|
||||
'link_rewrite' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64),
|
||||
'description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isString'),
|
||||
'meta_title' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
|
||||
'meta_description' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
||||
'meta_keywords' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
||||
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
|
||||
'link_rewrite' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 64),
|
||||
'description' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isString'),
|
||||
'meta_title' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128),
|
||||
'meta_description' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
||||
'meta_keywords' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -140,24 +140,6 @@ class CategoryCore extends ObjectModel
|
||||
return strip_tags(stripslashes($description));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check then return multilingual fields for database interaction
|
||||
*
|
||||
* @return array Multilingual fields
|
||||
*/
|
||||
public function getTranslationsFieldsChild()
|
||||
{
|
||||
$this->validateFieldsLang();
|
||||
return $this->getTranslationsFields(array(
|
||||
'name',
|
||||
'description' => array('html' => true),
|
||||
'link_rewrite',
|
||||
'meta_title',
|
||||
'meta_keywords',
|
||||
'meta_description',
|
||||
));
|
||||
}
|
||||
|
||||
public function add($autodate = true, $nullValues = false)
|
||||
{
|
||||
$this->position = self::getLastPosition((int)$this->id_parent);
|
||||
|
||||
Reference in New Issue
Block a user