[+] 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
+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`
');
}
}