[+] 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
+13
View File
@@ -187,6 +187,9 @@ class FeatureCore extends ObjectModel
public static function getFeaturesForComparison($list_ids_product, $id_lang)
{
if (!Feature::isFeatureActive())
return false;
$ids = '';
foreach($list_ids_product as $id)
$ids .= (int)($id).',';
@@ -206,5 +209,15 @@ class FeatureCore extends ObjectModel
GROUP BY f.`id_feature`
ORDER BY nb DESC');
}
/**
* This metohd is allow to know if a feature is used or active
* @since 1.5.0.1
* @return bool
*/
public static function isFeatureActive()
{
return Configuration::get('PS_FEATURE_FEATURE_ACTIVE');
}
}