]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/theme_filter.php
Updated copyright year.
[mailer.git] / inc / filter / theme_filter.php
index 9cd0749e5ce5ed18c8ceb1102cf15dcc3437334e..7c241fc3b488624ffc59c7e364aa3db9d36a6062 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 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=<pre>'.print_r($filterData,true).'</pre>';
+       //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=<pre>'.print_r($filterData,TRUE).'</pre>';
        return $filterData;
 }