From 3bafb01202db4b040fc0a9d7bb9be6415112c44c Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Fri, 10 Jul 2015 13:33:01 +0000 Subject: [PATCH] Fixed bug with the new locking mecanism: lock not released when applying a stimulus SVN:trunk[3637] --- pages/UI.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pages/UI.php b/pages/UI.php index c72d7694e..f21d59d97 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -1415,6 +1415,17 @@ EOF $sMessage = Dict::Format('UI:Class_Object_Updated', MetaModel::GetName(get_class($oObj)), $oObj->GetName()); $sSeverity = 'ok'; utils::RemoveTransaction($sTransactionId); + $bLockEnabled = MetaModel::GetConfig()->Get('concurrent_lock_enabled'); + if ($bLockEnabled) + { + // Release the concurrent lock, if any + $sOwnershipToken = utils::ReadPostedParam('ownership_token', null, false, 'raw_data'); + if ($sOwnershipToken !== null) + { + // We're done, let's release the lock + iTopOwnershipLock::ReleaseLock(get_class($oObj), $oObj->GetKey(), $sOwnershipToken); + } + } } } else