From 9cf706ced50e5bf66645a7661c995d2dccac256f Mon Sep 17 00:00:00 2001 From: BBcan177 Date: Mon, 15 Dec 2014 00:04:06 -0500 Subject: Mods to pfblockerng.php, .inc, _sync, _v4 and _v6 files. pfblockerng.inc - - Remove redundant ['action'] argument in if() statements. - If no interfaces are selected, defined empty variable and Array. - Separate "Skip & Hold" List download functionality into its own ['state'] process. This allows more fine grain control of each individual list in an Alias. - Remove argument for empty Interfaces in the Rules Re-order process. pfblockerng_sync.xml - - Fix broken link in sync file. pfblockerng_v4lists.xml and _v6 - - Separate "Skip & Hold" List download functionality into its own ['state'] process. This allows more fine grain control of each individual list in an Alias. - Minor Text improvements. --- config/pfblockerng/pfblockerng.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'config/pfblockerng/pfblockerng.php') diff --git a/config/pfblockerng/pfblockerng.php b/config/pfblockerng/pfblockerng.php index 7539e9fd..4e643cd6 100644 --- a/config/pfblockerng/pfblockerng.php +++ b/config/pfblockerng/pfblockerng.php @@ -304,9 +304,9 @@ if ($argv[1] == 'cron') { foreach ($list_type as $ip_type => $vtype) { if ($config['installedpackages'][$ip_type]['config'] != "") { foreach ($config['installedpackages'][$ip_type]['config'] as $list) { - if (is_array($list['row']) && $list['action'] != "Disabled" && $list['action'] != "") { + if (is_array($list['row']) && $list['action'] != "Disabled") { foreach ($list['row'] as $row) { - if ($row['url'] != "" && $row['format'] != "hold" && $row['format'] != "skip") { + if ($row['url'] != "" && $row['state'] != "Disabled") { if ($vtype == "_v4") { $header_url = "{$row['header']}"; @@ -323,6 +323,11 @@ if ($argv[1] == 'cron') { $header_dow = $list['dow']; $url_format = $row['format']; + // Bypass update if state is defined as "Hold" and list file exists + if (file_exists($pfbfolder . '/' . $header_url . '.txt') && $row['state'] == "Hold") { + continue; + } + # Check if List file exists, if not found run Update if (!file_exists($pfbfolder . '/' . $header_url . '.txt')) { $log = " Updates Found\n"; -- cgit v1.2.3