[+] 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
+24 -1
View File
@@ -158,7 +158,7 @@ class CombinationCore extends ObjectModel
FROM `'._DB_PREFIX_.'product_attribute_image`
WHERE `id_product_attribute` = '.(int)($this->id).'
');
}
}
public function setWsImages($values)
{
@@ -175,6 +175,29 @@ class CombinationCore extends ObjectModel
);
return true;
}
/**
* This method is allow to know if a feature is active
* @since 1.5.0.1
* @return bool
*/
public static function isFeatureActive()
{
return Configuration::get('PS_COMBINATION_FEATURE_ACTIVE');
}
/**
* This method is allow to know if a feature is in use
* @since 1.5.0.1
* @return bool
*/
public static function isActuallyUsed()
{
return (bool)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
SELECT COUNT(*)
FROM `ps_product_attribute`
');
}
}