mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
#765: prevent two persons to edit the same object at the same time.
SVN:trunk[3617]
This commit is contained in:
@@ -25,10 +25,22 @@ require_once(APPROOT.'/application/startup.inc.php');
|
||||
$oAppContext = new ApplicationContext();
|
||||
$currentOrganization = utils::ReadParam('org_id', '');
|
||||
$operation = utils::ReadParam('operation', '');
|
||||
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
$bPortal = utils::ReadParam('portal', false);
|
||||
$sUrl = utils::GetAbsoluteUrlAppRoot();
|
||||
|
||||
if ($operation == 'do_logoff')
|
||||
{
|
||||
// Reload the same dummy page to let the "calling" page execute its 'onunload' method before performing the actual logoff.
|
||||
// Note the redirection MUST NOT be made via an HTTP "header" since onunload is called only when the actual content of the DOM
|
||||
// is replaced by some other content. So the "bouncing" page must provide some content (in our case a script making the redirection).
|
||||
$oPage = new ajax_page('');
|
||||
$oPage->add_script("window.location.href='{$sUrl}pages/logoff.php?portal=$bPortal'");
|
||||
$oPage->output();
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($bPortal)
|
||||
{
|
||||
$sUrl .= 'portal/';
|
||||
@@ -37,7 +49,6 @@ else
|
||||
{
|
||||
$sUrl .= 'pages/UI.php';
|
||||
}
|
||||
|
||||
if (isset($_SESSION['auth_user']))
|
||||
{
|
||||
$sAuthUser = $_SESSION['auth_user'];
|
||||
|
||||
Reference in New Issue
Block a user