Fix for not found filters
[mailer.git] / inc / filter-functions.php
index 38a1262175cebe9c8064ddffc2b91d31cce25815..d096c8e43bb0c1fe74a1bfb1fcc021254a44b247 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Funktionen fuer Filter-System                    *
  * -------------------------------------------------------------------- *
- * $Revision:: 1185                                                   $ *
- * $Date:: 2009-10-11 04:16:39 +0200 (Sun, 11 Oct 2009)               $ *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author:: quix0r                                                   $ *
+ * $Author::                                                          $ *
  * Needs to be in all Files and every File needs "svn propset           *
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
@@ -163,7 +163,7 @@ ORDER BY
 
        // Compiling code
        registerFilter('compile_code', 'COMPILE_CONFIG');
-       registerFilter('compile_code', 'COMPILE_EXTENSION');
+       registerFilter('compile_code', 'COMPILE_EXPRESSION_CODE');
 
        // Generic extension update filters
        registerFilter('extension_update', 'UPDATE_EXTENSION_DATA');
@@ -184,6 +184,9 @@ ORDER BY
        registerFilter('page_footer', 'HANDLE_FATAL_ERRORS');
        registerFilter('page_footer', 'DISPLAY_COPYRIGHT');
        registerFilter('page_footer', 'DISPLAY_PARSING_TIME');
+
+       // Member login check. Always keep FETCH_USER_DATA as first entry!
+       registerFilter('member_login_check', 'FETCH_USER_DATA');
 }
 
 // "Registers" a new filter function
@@ -229,7 +232,7 @@ function unregisterFilter ($filterName, $filterFunction, $force = false, $dry_ru
        // Is that filter there?
        if ((!isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) {
                // Not found, so abort here
-               addFatalMessage(__FUNCTION__, __LINE__, getMessage('FILTER_FAILED_NOT_REMOVED'), array($filterFunction, $filterName));
+               addFatalMessage(__FUNCTION__, __LINE__, sprintf(getMessage('FILTER_FAILED_NOT_REMOVED'), $filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -245,11 +248,11 @@ function unregisterFilter ($filterName, $filterFunction, $force = false, $dry_ru
 function runFilterChain ($filterName, $data = null) {
        // Is that filter chain there?
        if (!isset($GLOBALS['cache_array']['filter']['chains'][$filterName])) {
-               // We should find all these non-existing filter chains
-               //* Only for tracking: */ if ($filterName != 'sql_admin_extra_data') {
-               //* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!');
-               //* Only for tracking: */ }
-               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!');
+               // Log not found filters in debug-mode
+               if (isDebugModeEnabled()) {
+                       // Log it away...
+                       logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!');
+               } // END - if
 
                // Abort here and return content
                return $data;