mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 15:08:45 +02:00
Handle the OnBeforeUnload events to call OnFormCancel handlers when needed so that the plug-ins have a chance to perform some cleanup.
SVN:trunk[1328]
This commit is contained in:
@@ -485,7 +485,19 @@ try
|
||||
// Can be useful in case a user got some corrupted prefs...
|
||||
appUserPreferences::ClearPreferences();
|
||||
break;
|
||||
|
||||
|
||||
case 'on_form_cancel':
|
||||
// Called when a creation/modification form is cancelled by the end-user
|
||||
// Let's take this opportunity to inform the plug-ins so that they can perform some cleanup
|
||||
$iTransactionId = utils::ReadParam('transaction_id', 0);
|
||||
$sTempId = session_id().'_'.$iTransactionId;
|
||||
foreach (MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
|
||||
{
|
||||
$oExtensionInstance->OnFormCancel($sTempId);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
$oPage->p("Invalid query.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user