]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/theme_filter.php
Several code cleanups:
[mailer.git] / inc / filter / theme_filter.php
index 5cb385c9949fca852d83278af6635a6d136df1f8..4c8de5c3085530221994d2ba62b44b0bb5f49c62 100644 (file)
@@ -41,8 +41,9 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for generic handling of theme change
-function FILTER_HANDLE_THEME_CHANGE () {
+function FILTER_HANDLE_THEME_CHANGE ($filterData) {
        // Check if new theme is selcted
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) {
                // Set new theme for guests
                $newTheme = postRequestParameter('new_theme');
@@ -59,11 +60,16 @@ function FILTER_HANDLE_THEME_CHANGE () {
                // Redirect to same URL
                redirectToRequestUri();
        } // END - if
+
+       // Return data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // Filter for settings theme from user profile, must be executed only if FILTER_FETCH_USER_DATA() ran before
-function FILTER_SET_USERS_THEME () {
+function FILTER_SET_USERS_THEME ($filterData) {
        // Is the user data valid?
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isMember()) {
                // Do only run for logged in members
                debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
@@ -71,6 +77,10 @@ function FILTER_SET_USERS_THEME () {
 
        // Change to new theme
        setTheme(getUserData('curr_theme'));
+
+       // Return data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // [EOF]