diff options
Diffstat (limited to 'src/usr/local/www/diag_dump_states.php')
-rw-r--r-- | src/usr/local/www/diag_dump_states.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php index 0ca467d..1010f45 100644 --- a/src/usr/local/www/diag_dump_states.php +++ b/src/usr/local/www/diag_dump_states.php @@ -237,10 +237,14 @@ print $form; $arr[] = array("filter" => $_POST['filter']); } - if (count($arr) > 0) { - $res = pfSense_get_pf_states($arr); + if (isset($_POST['filter']) || !isset($config['system']['webgui']['requirestatefilter'])) { + if (count($arr) > 0) { + $res = pfSense_get_pf_states($arr); + } else { + $res = pfSense_get_pf_states(); + } } else { - $res = pfSense_get_pf_states(); + $res = NULL; } $states = 0; @@ -298,6 +302,9 @@ print $form; if ($states == 0) { if (isset($_POST['filter']) && !empty($_POST['filter'])) { $errmsg = gettext('No states were found that match the current filter.'); + } else if (!isset($_POST['filter']) && isset($config['system']['webgui']['requirestatefilter'])) { + $errmsg = gettext('State display suppressed without filter submission. '. + 'See System > General, Require State Filter.'); } else { $errmsg = gettext('No states were found.'); } |