* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-}
+} // END - if
// Create a selection box with installed and activated themes or all if admin
function generateThemeSelectionBox () {
$mod = getModule();
// Construction URL
- $formAction = "{%url=modules.php?module=" . $mod;
- if (!empty($what)) $formAction .= "&what=" . $what;
- $formAction = '%}';
+ $formAction = '{%url=modules.php?module='. $mod;
+ if (!empty($what)) $formAction .= '&what=' . $what;
+ $formAction .= '%}';
// Initialize array
$themesArray = array(
// Fix it to default
$ret = 'default';
} // END - if
- } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) {
+ } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) {
// Prepare filename for checking
- $themeFile = sprintf("theme/%s/theme.php", getRequestElement('theme'));
+ $themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme'));
// Installation mode active
- if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) {
+ if ((isGetRequestParameterSet('theme')) && (isIncludeReadable($theme))) {
// Set cookie from URL data
- setTheme(getRequestElement('theme'));
- } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", secureString(postRequestElement('theme'))))) {
+ setTheme(getRequestParameter('theme'));
+ } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", secureString(postRequestParameter('theme'))))) {
// Set cookie from posted data
- setTheme(secureString(postRequestElement('theme')));
+ setTheme(secureString(postRequestParameter('theme')));
}
// Set return value
// Filter for generic handling of theme change
function FILTER_HANDLE_THEME_CHANGE () {
// Check if new theme is selcted
- if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) {
+ if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) {
// Set new theme for guests
- $newTheme = postRequestElement('new_theme');
+ $newTheme = postRequestParameter('new_theme');
// Change to new theme
setTheme($newTheme);
// Add new theme
addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme));
+
+ // Redirect to same URL
+ redirectToRequestUri();
} // END - if
}