demove deprecated functions : replace ajax_page by AjaxPage

This commit is contained in:
acognet
2022-01-21 11:21:26 +01:00
parent 910638d93f
commit 17e8c53236
8 changed files with 12 additions and 17 deletions

View File

@@ -28,7 +28,6 @@ $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();
@@ -37,7 +36,7 @@ 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 = new AjaxPage('');
$oPage->add_script("window.location.href='{$sUrl}pages/logoff.php?portal=$bPortal'");
$oPage->output();
exit;