]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter-functions.php
Typos fixed
[mailer.git] / inc / filter-functions.php
index 44e4cb04cf55499537f5597ba86fbe34a27038dd..be4d7d1fd556c3e75819bf1cd732bfe3a39d6a3f 100644 (file)
@@ -64,7 +64,7 @@ function initFilterSystem () {
 
                // Load all filters
                $result = SQL_QUERY('SELECT
-       `filter_name`,`filter_function`,`filter_active`' . $add . '
+       `filter_name`, `filter_function`, `filter_active`' . $add . '
 FROM
        `{?_MYSQL_PREFIX?}_filters`
 ORDER BY
@@ -224,7 +224,10 @@ function registerFilter ($filterName, $filterFunction, $silentAbort = true, $for
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'REGISTER: filterName=' . $filterName . ',filterFunction=' . $filterFunction);
                $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A';
                $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0';
-       } // END - if
+       } elseif (($silentAbort === false) && (!function_exists($filterFunction))) {
+               // Please report them all!
+               debug_report_bug(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',silentAbort=false,force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - NOT FOUND!');
+       }
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - EXIT!');
 }
@@ -272,6 +275,7 @@ function runFilterChain ($filterName, $filterData = null) {
        } // END - if
 
        // Default return value
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',count()=' . count($GLOBALS['cache_array']['filter']['chains'][$filterName]));
        $returnValue = $filterData;
 
        // Then run all filters
@@ -369,7 +373,7 @@ function loadExtensionFilters ($ext_name) {
                        $GLOBALS[__FUNCTION__][$ext_name] = true;
                } elseif (isDebugModeEnabled()) {
                        // Log missing file
-                       logDebugMessage(__FUNCTION__, __LINE__, 'Include file ' . $incFileName . ' for extension ' . $ext_name . ' is missing.');
+                       logDebugMessage(__FUNCTION__, __LINE__, 'Filter include file ' . $incFileName . ' for extension ' . $ext_name . ' is missing.');
                }
        } // END - if
 }