Automatic deactivation of installed but deprecated extwensions fixed
[mailer.git] / inc / filter-functions.php
index a292ca2647989ca5fbfbb9ae62b5737f6b416915..8d78bb5d638e077855dea74129de6994c99476df 100644 (file)
@@ -225,10 +225,7 @@ 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';
-       } 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!');
-       }
+       } // END - if
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - EXIT!');
 }
@@ -285,14 +282,11 @@ function runFilterChain ($filterName, $filterData = NULL) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Running: name=' . $filterName . ',func=' . $filterFunction . ',active=' . $active);
 
                // Is the filter active or newly added??
-               if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown','extension_remove','post_extension_run_sql'))) && ($active == 'R'))) {
+               if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown', 'extension_remove', 'post_extension_run_sql'))) && ($active == 'R'))) {
                        // Is this filter there?
                        if (!function_exists($filterFunction)) {
-                               // Unregister it
-                               unregisterFilter(__FUNCTION__, __LINE__, $filterName, $filterFunction);
-
-                               // Skip this entry
-                               continue;
+                               // Should be fixed
+                               debug_report_bug(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - AUTO-UNREGISTERED!');
                        } // END - if
 
                        // Call the filter chain