[-] Core: ObjectModel::toggleStatus should change only active field on multishop with global context #PSCFV-9707

This commit is contained in:
Rémi Gaillard
2013-07-09 11:19:58 +02:00
parent bfa82c9648
commit 7b62144220
+4 -1
View File
@@ -763,6 +763,9 @@ abstract class ObjectModelCore
if (!array_key_exists('active', $this))
throw new PrestaShopException('property "active" is missing in object '.get_class($this));
// Update only active field
$this->setFieldsToUpdate(array('active' => true));
// Update active status on object
$this->active = !(int)$this->active;
@@ -1608,4 +1611,4 @@ abstract class ObjectModelCore
{
$this->update_fields = $fields;
}
}
}