X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffilters.php;h=fe843fb8f0a74f9ad1c1835985e69490ba1bea1d;hp=79f0ef4c6e31ae4925f166962a41b993abbce9df;hb=3e67aa21428cb9bc5b8d7552d2dd0770fc46dfb3;hpb=0f9689b7d070311251abdc1dc3c5f970a4227021 diff --git a/inc/filters.php b/inc/filters.php index 79f0ef4c6e..fe843fb8f0 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -130,7 +130,7 @@ ORDER BY `filter_id` ASC", __FILE__, __LINE__); } // "Registers" a new filter function -function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $force = false, $add = true) { +function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) { global $filters, $counter; // Extend the filter function name @@ -155,7 +155,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo } // END - if // Shall we add it? - if ($add) { + if (!$dry_run) { // Simply add it to the array $filters[$filterName][$filterFunction] = "Y"; $counter[$filterName][$filterFunction] = 0; @@ -163,7 +163,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo } // "Unregisters" a filter from the given chain -function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $remove = true) { +function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $dry_run = false) { global $filters, $counter, $loadedFilters; // Extend the filter function name only if not loaded from database @@ -179,7 +179,7 @@ function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $remov } // END - if // Shall we remove? (default, not while just showing an extension removal) - if ($remove) { + if (!$dry_run) { // Mark for filter removal $filters[$filterName][$filterFunction] = "R"; unset($counter[$filterName][$filterFunction]);