]> git.mxchange.org Git - mailer.git/blobdiff - inc/ajax-functions.php
MINOR: Small code improvements
[mailer.git] / inc / ajax-functions.php
index 1b46e221bb35960c19dc067811c00cbd545ac01e..43a6244afae1dbdce4c4944f18a469a71769d467 100644 (file)
@@ -48,6 +48,9 @@ function initAjax () {
                'reply_content' => NULL,
        );
 
+       // Init call-back debug information
+       $GLOBALS['ajax_callback_function'] = NULL;
+
        // Set content type (mostly JSON)
        setContentType('application/json');
 
@@ -132,7 +135,7 @@ function sendAjaxContent () {
        // Is the status fine or template not found (404)?
        if (isAjaxHttpStatusAccepted()) {
                // Then output the JSON
-               outputHtml(json_encode($GLOBALS['ajax_reply'], JSON_FORCE_OBJECT));
+               outputHtml(encodeJson($GLOBALS['ajax_reply']));
        } // END - if
 }