From 7b62144220e242dcb371de4189521fdfc961a071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Tue, 9 Jul 2013 11:19:58 +0200 Subject: [PATCH] [-] Core: ObjectModel::toggleStatus should change only active field on multishop with global context #PSCFV-9707 --- classes/ObjectModel.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/classes/ObjectModel.php b/classes/ObjectModel.php index 83fdb7516..27e1560db 100644 --- a/classes/ObjectModel.php +++ b/classes/ObjectModel.php @@ -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; } -} \ No newline at end of file +}