]> git.mxchange.org Git - mailer.git/blobdiff - inc/ajax-functions.php
Removed deprecated 'hidden' column from mod_reg table.
[mailer.git] / inc / ajax-functions.php
index 512b3ae5751883b66b834bf917a08c314cd1c1c8..90e48a1a023669253d21f4606865a5ce905ae23f 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : AJAX-bezogene Funktionen                         *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
@@ -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
@@ -80,7 +75,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 +83,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 +126,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