X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fajax-functions.php;h=ce4feea80254c67d041de54922449eb29bb775a7;hb=e5ee863933a5062292d2467fff8a51bf9a618785;hp=43a6244afae1dbdce4c4944f18a469a71769d467;hpb=2a852c2894711c1818ec7246d71c2a2d7c81fbcf;p=mailer.git diff --git a/inc/ajax-functions.php b/inc/ajax-functions.php index 43a6244afa..ce4feea802 100644 --- a/inc/ajax-functions.php +++ b/inc/ajax-functions.php @@ -10,13 +10,8 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : AJAX-bezogene Funktionen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2016 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -61,7 +56,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 @@ -71,6 +66,7 @@ function initAjax () { function setAjaxReplyContent ($content) { // Log message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . strlen($content)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content[]=' . gettype($content)); // Set it, but with URL encoding $GLOBALS['ajax_reply']['reply_content'] = urlencode(doFinalCompilation($content, FALSE)); @@ -80,7 +76,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 +84,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 +127,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