[-] BO : fixed bug #PSCFV-2285 - Unable to activate/deactivate a product from list

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15248 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vAugagneur
2012-05-14 08:10:19 +00:00
parent 65dc076142
commit 392c0f51d3
+2 -6
View File
@@ -655,16 +655,12 @@ abstract class ObjectModelCore
// Object must have a variable called 'active'
if (!array_key_exists('active', $this))
throw new PrestaShopException('property "active is missing in object '.get_class($this));
// Update active status on object
$this->active = !(int)$this->active;
// Change status to active/inactive
return Db::getInstance()->execute('
UPDATE `'.pSQL(_DB_PREFIX_.$this->def['table']).'`
SET `active` = !`active`
WHERE `'.pSQL($this->def['primary']).'` = '.(int)$this->id
);
return $this->update();
}
/**