From: Roland Häder Date: Mon, 19 Nov 2012 01:09:30 +0000 (+0000) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6a675521bf2bf11b0cd521a9c602085f7bec5283;p=mailer.git Continued: - Renamed setOutputMode() to setScriptOutputMode() to be more conform with getScriptOutput() - Added template for AJAX scripts - Added check for isAjaxOutput() and isInstallationPhase() to proper scripts --- diff --git a/.gitattributes b/.gitattributes index f90a825e2d..72ff75a341 100644 --- a/.gitattributes +++ b/.gitattributes @@ -83,6 +83,7 @@ img/uberwach/uberwach-kamera-gruen.gif -text svneol=unset#image/gif inc/.htaccess svneol=native#text/plain inc/ajax-functions.php svneol=native#text/plain inc/ajax/.htaccess svneol=native#text/plain +inc/ajax/ajax_ svneol=native#text/plain inc/ajax/ajax_admin.php svneol=native#text/plain inc/ajax/ajax_installer.php svneol=native#text/plain inc/autopurge.php -text diff --git a/inc/ajax/ajax_ b/inc/ajax/ajax_ new file mode 100644 index 0000000000..84b5c7f2b7 --- /dev/null +++ b/inc/ajax/ajax_ @@ -0,0 +1,44 @@ + diff --git a/inc/ajax/ajax_admin.php b/inc/ajax/ajax_admin.php index 05d9d690f1..827af52ec4 100644 --- a/inc/ajax/ajax_admin.php +++ b/inc/ajax/ajax_admin.php @@ -36,7 +36,7 @@ ************************************************************************/ // Some security stuff... -if ((!defined('__SECURITY')) || (!isAdmin())) { +if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isAdmin())) { die(); } // END - if @@ -108,5 +108,6 @@ function doAjaxAdminRequestContent () { } } // END - if } + // [EOF] ?> diff --git a/inc/ajax/ajax_installer.php b/inc/ajax/ajax_installer.php index 425c81b029..5267a3aee5 100644 --- a/inc/ajax/ajax_installer.php +++ b/inc/ajax/ajax_installer.php @@ -36,7 +36,7 @@ ************************************************************************/ // Some security stuff... -if (!defined('__SECURITY')) { +if ((!defined('__SECURITY')) || (!isAjaxOutputMode()) || (!isInstallationPhase())) { die(); } // END - if diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index e312c565a0..2e401e4bc5 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -707,7 +707,7 @@ function getScriptOutputMode () { } // Setter for 'output_mode' value -function setOutputMode ($newOutputMode) { +function setScriptOutputMode ($newOutputMode) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'output_mode=' . $newOutputMode); $GLOBALS['__output_mode'] = (int) $newOutputMode; } @@ -1176,7 +1176,7 @@ function sendRawRedirect ($url) { $GLOBALS['__output'] = ''; // To make redirects working (no content type), output mode must be raw - setOutputMode(-1); + setScriptOutputMode(-1); // Send helping header setHttpStatus('302 Found');