[+] 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 -1
View File
@@ -123,6 +123,8 @@ class AttributeGroupCore extends ObjectModel
*/
public static function getAttributes($id_lang, $id_attribute_group)
{
if (!Combination::isFeatureActive())
return array();
return Db::getInstance()->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'attribute` a
@@ -139,6 +141,8 @@ class AttributeGroupCore extends ObjectModel
*/
public static function getAttributesGroups($id_lang)
{
if (!Combination::isFeatureActive())
return array();
return Db::getInstance()->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'attribute_group` ag
@@ -154,7 +158,8 @@ class AttributeGroupCore extends ObjectModel
public function deleteSelection($selection)
{
/* Also delete Attributes */
foreach ($selection AS $value) {
foreach ($selection AS $value)
{
$obj = new AttributeGroup($value);
if (!$obj->delete())
return false;