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

// clean code

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8328 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-09-03 17:21:32 +00:00
parent adb185cdf9
commit 3eff951265
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)];