[+] Project : adding Features detachables in order to improve performance

// clean code
This commit is contained in:
aFolletete
2011-09-03 17:21:32 +00:00
parent a4491c9897
commit 230bebc7c7
51 changed files with 1081 additions and 419 deletions
+6
View File
@@ -481,6 +481,9 @@ class CustomerCore extends ObjectModel
public static function getGroupsStatic($id_customer)
{
if (!Group::isFeatureActive())
return array(1);
$groups = array();
$result = Db::getInstance()->ExecuteS('
SELECT cg.`id_group`
@@ -511,6 +514,9 @@ class CustomerCore extends ObjectModel
public static function getDefaultGroupId($id_customer)
{
if (!Group::isFeatureActive())
return 1;
if (!isset(self::$_defaultGroupId[(int)($id_customer)]))
self::$_defaultGroupId[(int)($id_customer)] = Db::getInstance()->getValue('SELECT `id_default_group` FROM `'._DB_PREFIX_.'customer` WHERE `id_customer` = '.(int)$id_customer);
return self::$_defaultGroupId[(int)($id_customer)];