mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
demove deprecated functions : replace ajax_page by AjaxPage
This commit is contained in:
@@ -19,17 +19,16 @@
|
||||
|
||||
require_once('../../approot.inc.php');
|
||||
require_once(APPROOT.'/application/application.inc.php');
|
||||
require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
|
||||
/**
|
||||
* @param \ajax_page $oPage
|
||||
* @param \AjaxPage $oPage
|
||||
* @param int $iTransactionId
|
||||
*
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \OQLException
|
||||
*/
|
||||
function RenderAttachments(ajax_page $oPage, $iTransactionId)
|
||||
function RenderAttachments(AjaxPage $oPage, $iTransactionId)
|
||||
{
|
||||
$sClass = utils::ReadParam('objclass', '', false, 'class');
|
||||
$sId = utils::ReadParam('objkey', '');
|
||||
@@ -59,7 +58,7 @@ try
|
||||
require_once APPROOT.'/application/loginwebpage.class.inc.php';
|
||||
LoginWebPage::DoLoginEx(null /* any portal */, false);
|
||||
|
||||
$oPage = new ajax_page("");
|
||||
$oPage = new AjaxPage("");
|
||||
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
|
||||
if (!defined('APPROOT')) require_once(__DIR__.'/../../approot.inc.php');
|
||||
require_once(APPROOT.'/application/application.inc.php');
|
||||
require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
|
||||
require_once(APPROOT.'core/mutex.class.inc.php');
|
||||
|
||||
@@ -49,7 +48,7 @@ function DisplayErrorAndDie($oPage, $sHtmlErrorMessage, $exitCode = null)
|
||||
|
||||
$sOperation = utils::ReadParam('operation', '');
|
||||
|
||||
$oPage = new ajax_page('');
|
||||
$oPage = new AjaxPage('');
|
||||
$oPage->SetContentType('text/html');
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
*/
|
||||
if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
|
||||
require_once (APPROOT.'application/webpage.class.inc.php');
|
||||
require_once (APPROOT.'application/ajaxwebpage.class.inc.php');
|
||||
require_once (APPROOT.'application/utils.inc.php');
|
||||
require_once (APPROOT.'core/log.class.inc.php');
|
||||
IssueLog::Enable(APPROOT.'log/error.log');
|
||||
@@ -110,7 +109,7 @@ function DoBackup($sTargetFile)
|
||||
*/
|
||||
function ReportStatus($sMessage, $bSuccess, $iErrorCode = 0, $aMoreFields = array())
|
||||
{
|
||||
$oPage = new ajax_page("");
|
||||
$oPage = new AjaxPage("");
|
||||
$oPage->SetContentType('application/json');
|
||||
$aResult = array(
|
||||
'code' => $iErrorCode,
|
||||
|
||||
@@ -1060,7 +1060,7 @@ EOF
|
||||
$iCol = utils::ReadParam("iCol");
|
||||
$sDashletIdOrig = utils::ReadParam("dashletid");
|
||||
$sFinalDashletId = Dashboard::GetDashletUniqueId($bIsCustomized, $sDashboardDivId, $iRow, $iCol, $sDashletIdOrig);
|
||||
$oPage = new ajax_page('');
|
||||
$oPage = new AjaxPage('');
|
||||
$oPage->add($sFinalDashletId);
|
||||
break;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -128,7 +128,6 @@ require_once(APPROOT.'/core/log.class.inc.php');
|
||||
require_once(APPROOT.'/core/kpi.class.inc.php');
|
||||
require_once(APPROOT.'/core/cmdbsource.class.inc.php');
|
||||
require_once('./xmldataloader.class.inc.php');
|
||||
require_once(APPROOT.'/application/ajaxwebpage.class.inc.php');
|
||||
|
||||
|
||||
// Never cache this page
|
||||
@@ -158,7 +157,7 @@ try
|
||||
$sState = utils::ReadParam('step_state', '');
|
||||
$sActionCode = utils::ReadParam('code', '');
|
||||
$aParams = utils::ReadParam('params', array(), false, 'raw_data');
|
||||
$oPage = new ajax_page('');
|
||||
$oPage = new AjaxPage('');
|
||||
$oDummyController = new WizardController('');
|
||||
if (is_subclass_of($sClass, 'WizardStep'))
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ abstract class Controller
|
||||
private $m_sOperation;
|
||||
/** @var string */
|
||||
private $m_sModule;
|
||||
/** @var iTopWebPage|\ajax_page */
|
||||
/** @var iTopWebPage|\AjaxPage */
|
||||
private $m_oPage;
|
||||
/** @var bool */
|
||||
private $m_bCheckDemoMode = false;
|
||||
@@ -332,7 +332,7 @@ abstract class Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an AJAX page (ajax_page)
|
||||
* Display an AJAX page (AjaxPage)
|
||||
*
|
||||
* @api
|
||||
*
|
||||
@@ -347,7 +347,7 @@ abstract class Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display an AJAX page (ajax_page)
|
||||
* Display an AJAX page (AjaxPage)
|
||||
*
|
||||
* @api
|
||||
*
|
||||
|
||||
@@ -285,7 +285,7 @@ if (!empty($sExpression))
|
||||
break;
|
||||
|
||||
case 'xlsx':
|
||||
$oP = new ajax_page('');
|
||||
$oP = new AjaxPage('');
|
||||
$oExporter = new ExcelExporter();
|
||||
$oExporter->SetObjectList($oFilter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user