#765: prevent two persons to edit the same object at the same time.

SVN:trunk[3617]
This commit is contained in:
Denis Flaven
2015-07-02 15:40:39 +00:00
parent 7f65e9fd5e
commit 9917d6355c
13 changed files with 784 additions and 69 deletions

View File

@@ -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'];