From: Roland Häder Date: Mon, 19 Sep 2011 17:56:33 +0000 (+0000) Subject: Now getCurrentTheme() does check if 'theme' is provided in POST data or URL, by POST... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50de3a1d66e8c897d141254111aaa18dcc40f5f8;p=mailer.git Now getCurrentTheme() does check if 'theme' is provided in POST data or URL, by POST rules --- diff --git a/inc/functions.php b/inc/functions.php index eb353b4481..e768c7e02e 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -534,6 +534,12 @@ function makeTime ($hours, $minutes, $seconds, $stamp) { // Redirects to an URL and if neccessarry extends it with own base URL function redirectToUrl ($url, $allowSpider = true) { + // Is the output mode -2? + if (getScriptOutputMode() == -2) { + // This is always (!) an AJAX request and shall not be redirected + return; + } // END - if + // Remove {%url= if (substr($url, 0, 6) == '{%url=') { $url = substr($url, 6, -2); @@ -1048,11 +1054,17 @@ function getCurrentTheme () { // The default theme is 'default'... ;-) $ret = 'default'; - // Do we have ext-theme installed and active? - if (isExtensionActive('theme')) { + // Do we have ext-theme installed and active or is 'theme' in URL or POST data? + if ((isPostRequestElementSet('theme')) && (isIncludeReadable(sprintf("theme/%s/theme.php", postRequestElement('theme'))))) { + // Use value from POST data + $ret = postRequestElement('theme'); + } elseif ((isGetRequestElementSet('theme')) && (isIncludeReadable(sprintf("theme/%s/theme.php", getRequestElement('theme'))))) { + // Use value from GET data + $ret = getRequestElement('theme'); + } elseif (isExtensionActive('theme')) { // Call inner method $ret = getActualTheme(); - } // END - if + } // Return theme value return $ret; diff --git a/inc/stylesheet.php b/inc/stylesheet.php index 715bf8fc4c..ab881f0286 100644 --- a/inc/stylesheet.php +++ b/inc/stylesheet.php @@ -108,13 +108,7 @@ if ((isCssOutputMode()) || (getConfig('css_php') == 'DIRECT')) { $OUT = '