]> git.mxchange.org Git - mailer.git/blobdiff - inc/filters.php
Major rewrite of template system:
[mailer.git] / inc / filters.php
index aeb102d24d49971166299bafed1632ca4863db09..8c2606b05c9094ed384f4da04f1eb4796716b917 100644 (file)
@@ -998,14 +998,14 @@ function FILTER_DISPLAY_PARSING_TIME () {
 // Filter for flushing template cache
 function FILTER_FLUSH_TEMPLATE_CACHE () {
        // Do not flush when debugging the template cache
-       if (isDebuggingTemplateCache()) {
+       if (isDebugTemplateCacheEnabled()) {
                // Do not flush templates in debug-mode
                return;
        } // END - if
 
        // Is there cached eval() data?
        if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) {
-               // Now flush all
+               // Flush all
                foreach ($GLOBALS['template_eval'] as $prefix => $templateArray) {
                        foreach ($templateArray as $template => $eval) {
                                // Flush the cache (if not yet found)
@@ -1017,19 +1017,23 @@ function FILTER_FLUSH_TEMPLATE_CACHE () {
 
 // Filter for loading user data
 function FILTER_FETCH_USER_DATA ($userid = NULL) {
-       // Is the userid not set? Then use member id
+       // Is the userid not set?
        if (!isValidUserId($userid)) {
+               // Then use member id
                $userid = getMemberId();
        } // END - if
 
        // Get user data
        if (!fetchUserData($userid)) {
                // Userid is not valid
-               reportBug(__FUNCTION__, __LINE__, 'User id '.$userid . ' is invalid.');
+               reportBug(__FUNCTION__, __LINE__, 'User id ' . $userid . ' is invalid.');
        } // END - if
 
        // Set member id
        setMemberId($userid);
+
+       // Continue with next filter
+       return $userid;
 }
 
 // Filter for reseting users' last login failure, only available with latest ext-sql_patches