Rewrote some parts:
[mailer.git] / inc / filter / theme_filter.php
index 3227a34..e5fc19f 100644 (file)
@@ -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');