diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index eaf2b7cd86..77806d5f2f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-12-15 Juan Manuel Ramon + + * operation/events/events_list.php + operation/events/events.php: Added new option for display all + events in event viewer. + 2011-12-15 Sergio Martin * godmode/setup/setup.php: Fixed bad use of __() function diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index 8a7f6346ec..391379b237 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -167,7 +167,7 @@ $delete = (bool) get_parameter ("delete"); $validate = (bool) get_parameter ("validate", 0); $section = (string) get_parameter ("section", "list"); $text_agent = (string)get_parameter('text_agent', __("All")); -$filter_only_alert = (int)get_parameter('filter_only_alert', 0); +$filter_only_alert = (int)get_parameter('filter_only_alert', -1); $search = io_safe_output(preg_replace ("/&([A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&", rawurldecode (get_parameter ("search")))); diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index be2fb53a4b..f89ceeead2 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -145,7 +145,7 @@ if ($tag != "") { if (isset($filter_only_alert)){ if ($filter_only_alert == 0) $sql_post .= " AND event_type NOT LIKE '%alert%'"; - else + else if ($filter_only_alert == 1) $sql_post .= " AND event_type LIKE '%alert%'"; } @@ -271,9 +271,9 @@ html_print_select ($tags_name, "tag", $tag, '', __('All'), ""); echo ""; echo ""; -echo __("Filter/Only alert events") . ""; +echo __("Alert events") . ""; -html_print_select (array('0' => __('Filter alert events'), '1' => __('Only alert events')), "filter_only_alert", $filter_only_alert, '', '', ''); +html_print_select (array('-1' => __('All'), '0' => __('Filter alert events'), '1' => __('Only alert events')), "filter_only_alert", $filter_only_alert, '', '', ''); echo "";