X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fajax-functions.php;h=d3736e0f03043caddaca465a74056c03c9cc6915;hb=eb3e924768678719afc1bfaffb69354c407daa5b;hp=512b3ae5751883b66b834bf917a08c314cd1c1c8;hpb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;p=mailer.git diff --git a/inc/ajax-functions.php b/inc/ajax-functions.php index 512b3ae575..d3736e0f03 100644 --- a/inc/ajax-functions.php +++ b/inc/ajax-functions.php @@ -61,7 +61,7 @@ function initAjax () { setUsername('{--USERNAME_AJAX--}'); // In installation phase load ajax_installer.php - if (isInstallationPhase()) { + if (isInstaller()) { // Load it loadIncludeOnce('inc/ajax/ajax_installer.php'); } // END - if @@ -80,7 +80,7 @@ function setAjaxReplyContent ($content) { * Checks whether the AJAX access level was valid. This function doesn't need * caching in $GLOBALS[__FUNCTION__] because it will be called only once. */ -function isAjaxRequestLevelValid () { +function isValidAjaxRequestLevel () { // By default nothing is valid $isValid = FALSE; @@ -88,7 +88,7 @@ function isAjaxRequestLevelValid () { switch (postRequestElement('level')) { case 'install': // Installation phase level // Simply check for it - $isValid = isInstallationPhase(); + $isValid = isInstaller(); break; case 'admin': // Admin area @@ -131,9 +131,9 @@ function processAjaxRequest () { } // Send AJAX content -function sendAjaxContent () { +function sendAjaxContent ($forceOutput = FALSE) { // Is the status fine or template not found (404)? - if (isAjaxHttpStatusAccepted()) { + if ((isAjaxHttpStatusAccepted()) || ($forceOutput === TRUE)) { // Then output the JSON outputHtml(encodeJson($GLOBALS['ajax_reply'])); } // END - if