X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffilter%2Ftheme_filter.php;h=e5fc19f7d97052017ca475d776a7bb2c9cdfa943;hb=ba59d6cfbe27195f59bbe2b7cab3d01bf9ceb566;hp=9cd0749e5ce5ed18c8ceb1102cf15dcc3437334e;hpb=60929c313ccc10e74e2724373f7bc9ee00d774d1;p=mailer.git diff --git a/inc/filter/theme_filter.php b/inc/filter/theme_filter.php index 9cd0749e5c..e5fc19f7d9 100644 --- a/inc/filter/theme_filter.php +++ b/inc/filter/theme_filter.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 * @@ -45,7 +45,7 @@ function FILTER_HANDLE_THEME_CHANGE ($filterData) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); // Check if new theme is selcted - if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) { + if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme()) && (isThemeReadable(postRequestElement('new_theme')))) { // Set new theme for guests $newTheme = postRequestElement('new_theme'); @@ -53,10 +53,10 @@ function FILTER_HANDLE_THEME_CHANGE ($filterData) { setMailerTheme($newTheme); // Remove current from array - removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", getCurrentTheme())); + removeIncludeFromPool('theme', sprintf('theme/%s/theme.php', getCurrentTheme())); // Add new theme - addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme)); + addIncludeToPool('theme', sprintf('theme/%s/theme.php', $newTheme)); // Redirect to same URL redirectToRequestUri(); @@ -95,7 +95,7 @@ function FILTER_THEME_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; }