]> git.mxchange.org Git - mailer.git/blobdiff - ajax.php
Exclude directories now
[mailer.git] / ajax.php
index f6c06483392262583de762d78b0bae666892a39d..518c2c2512c0a40e2cc068f143f07ba92b5ba50b 100644 (file)
--- a/ajax.php
+++ b/ajax.php
@@ -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 *
@@ -72,10 +72,10 @@ if ((getHttpRequestMethod() == 'POST') && (isPostRequestElementSet('level'))) {
                // Process the request
                processAjaxRequest();
 
-               // Is there an error? ('200 OK' is fine)
-               if ((getHttpStatus() != '200 OK') && (getHttpStatus() != '404 NOT FOUND')) {
+               // Is there an error which is not fine?
+               if (!isAjaxHttpStatusAccepted()) {
                        // The process was handled but didn't work
-                       reportBug(__FUNCTION__, __LINE__, 'AJAX request is valid but does not do anything.');
+                       reportBug(__FUNCTION__, __LINE__, 'AJAX request level=' . isPostRequestElementSet('level') . ',status=' . getHttpStatus() . ',callback[' . gettype($GLOBALS['ajax_callback_function']) . ']=' . $GLOBALS['ajax_callback_function'] . ' is valid but does not do anything.');
                } // END - if
        } else {
                // Not allowed