]> git.mxchange.org Git - mailer.git/blobdiff - inc/ajax/ajax_admin.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / ajax / ajax_admin.php
index f8db0fdd0eb68df9c71f80dbebb9bae465e0b399..9b5996b7f408a5fbe3f9aaf3116836b713a394fc 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -37,7 +37,8 @@
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isAdmin())) {
-       die();
+       header('HTTP/1.1 403 Forbidden');
+       die(json_encode(array('reply_content' => 'Access forbidden'), JSON_FORCE_OBJECT));
 } // END - if
 
 // "Generates" admin content by loading a message template
@@ -59,6 +60,7 @@ function doAjaxProcessAdmin () {
 
        // Again we do a call-back, so generate a function name depending on 'do'
        $callbackName = 'doAjaxAdmin' . capitalizeUnderscoreString(postRequestElement('do'));
+       $GLOBALS['ajax_callback_function'] = $callbackName;
 
        // Is the call-back function there?
        if (!function_exists($callbackName)) {