From 0834e36b3824df8ed925c0515c68cfab35d038d3 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Fri, 30 Jun 2017 12:51:09 +0000 Subject: [PATCH] Archive: fix dashboard management (edition, revert, from file) when archive mode is on SVN:trunk[4782] --- application/dashboard.class.inc.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index c10c84c47..110723995 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1,5 +1,5 @@ Fetch(); $oUserDashboard->Set('contents', $sXml); - - $oUserDashboard->DBUpdate(); } else { @@ -525,9 +523,10 @@ class RuntimeDashboard extends Dashboard $oUserDashboard->Set('user_id', UserRights::GetUserId()); $oUserDashboard->Set('menu_code', $this->sId); $oUserDashboard->Set('contents', $sXml); - - $oUserDashboard->DBInsert(); - } + } + utils::PushArchiveMode(false); + $oUserDashboard->DBWrite(); + utils::PopArchiveMode(); } public function Revert() @@ -540,7 +539,9 @@ class RuntimeDashboard extends Dashboard { // Assuming there is at most one couple {user, menu}! $oUserDashboard = $oUDSet->Fetch(); + utils::PushArchiveMode(false); $oUserDashboard->DBDelete(); + utils::PopArchiveMode(); } }