// Fix null values ...

This commit is contained in:
rMalie
2011-12-22 23:20:30 +00:00
parent ab9fa84606
commit e2bc19d873
41 changed files with 178 additions and 161 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ class ConfigurationCore extends ObjectModel
'multilang' => true,
'fields' => array(
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isConfigName', 'required' => true, 'size' => 32),
'id_group_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'id_group_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'),
'id_shop' => array('type' => self::TYPE_NOTHING, 'validate' => 'isUnsignedId'),
'value' => array('type' => self::TYPE_STRING),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
+4
View File
@@ -36,6 +36,7 @@ abstract class ObjectModelCore
const TYPE_FLOAT = 4;
const TYPE_DATE = 5;
const TYPE_HTML = 6;
const TYPE_NOTHING = 7;
/**
* List of association types
@@ -338,6 +339,9 @@ abstract class ObjectModelCore
return '\''.pSQL($value, true).'\'';
return pSQL($value, true);
case self::TYPE_NOTHING :
return $value;
case self::TYPE_STRING :
default :
if ($with_quotes)