}
// "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
} // 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;
}
// "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
} // 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]);