// Normalization

This commit is contained in:
mDeflotte committed 2011-10-04 12:04:19 +00:00
1 parent 77f597d97c
commit 6210c838e4
1 file changed
+12 -12
+12 -12
View File
@@ -27,35 +27,35 @@
class GroupCore extends ObjectModel class GroupCore extends ObjectModel
{ {
public $id; public $id;
/** @var string Lastname */ /** @var string Lastname */
public $name; public $name;
/** @var string Reduction */ /** @var string Reduction */
public $reduction; public $reduction;
/** @var int Price display method (tax inc/tax exc) */ /** @var int Price display method (tax inc/tax exc) */
public $price_display_method; public $price_display_method;
/** @var string Object creation date */ /** @var string Object creation date */
public $date_add; public $date_add;
/** @var string Object last modification date */ /** @var string Object last modification date */
public $date_upd; public $date_upd;
protected $tables = array ('group'); protected $tables = array ('group');
protected $fieldsRequired = array('price_display_method'); protected $fieldsRequired = array('price_display_method');
protected $fieldsSize = array(); protected $fieldsSize = array();
protected $fieldsValidate = array('reduction' => 'isFloat', 'price_display_method' => 'isPriceDisplayMethod'); protected $fieldsValidate = array('reduction' => 'isFloat', 'price_display_method' => 'isPriceDisplayMethod');
protected $fieldsRequiredLang = array('name'); protected $fieldsRequiredLang = array('name');
protected $fieldsSizeLang = array('name' => 32); protected $fieldsSizeLang = array('name' => 32);
protected $fieldsValidateLang = array('name' => 'isGenericName'); protected $fieldsValidateLang = array('name' => 'isGenericName');
protected $table = 'group'; protected $table = 'group';
protected $identifier = 'id_group'; protected $identifier = 'id_group';
protected static $_cacheReduction = array(); protected static $_cacheReduction = array();
protected static $_groupPriceDisplayMethod = array(); protected static $_groupPriceDisplayMethod = array();
@@ -110,7 +110,7 @@ class GroupCore extends ObjectModel
'.($limit > 0 ? 'LIMIT '.(int)$start.', '.(int)$limit : '')); '.($limit > 0 ? 'LIMIT '.(int)$start.', '.(int)$limit : ''));
} }
public static function getReduction($id_customer = NULL) public static function getReduction($id_customer = null)
{ {
if (!isset(self::$_cacheReduction['customer'][(int)$id_customer])) if (!isset(self::$_cacheReduction['customer'][(int)$id_customer]))
self::$_cacheReduction['customer'][(int)$id_customer] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(' self::$_cacheReduction['customer'][(int)$id_customer] = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('