diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 688fe9c0fa..02c21ac9ca 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2013-05-16 Miguel de Dios + + * operation/agentes/stat_win.php: disabled show events when the + pandora node is set replication events. + + Fixes: #2216 + + * operation/events/events.php: improve the source code style. + 2013-05-16 Miguel de Dios * ajax.php: fixed PHP warning when the HTTP_REFERER not set. diff --git a/pandora_console/operation/agentes/stat_win.php b/pandora_console/operation/agentes/stat_win.php index 046bb8f454..47b6785086 100644 --- a/pandora_console/operation/agentes/stat_win.php +++ b/pandora_console/operation/agentes/stat_win.php @@ -281,7 +281,18 @@ $label = base64_decode(get_parameter('label', '')); $data = array(); $data[0] = __('Show events'); - $data[1] = html_print_checkbox ("draw_events", 1, (bool) $draw_events, true); + $disabled = false; + if (isset($config['event_replication'])) { + if ($config['event_replication']) { + $disabled = true; + } + } + $data[1] = html_print_checkbox ("draw_events", 1, + (bool)$draw_events, true, $disabled); + if ($disabled) { + $data[1] .= ui_print_help_tip( + __('Show events is disabled because this Pandora node is set the event replication.'), true); + } $table->data[] = $data; $table->rowclass[] = ''; diff --git a/pandora_console/operation/events/events.php b/pandora_console/operation/events/events.php index a2f2da0d91..35dd27acb0 100644 --- a/pandora_console/operation/events/events.php +++ b/pandora_console/operation/events/events.php @@ -46,8 +46,8 @@ $readonly = false; if (!$meta) { if (isset($config['event_replication']) && $config['event_replication'] == 1) { - - if($config['show_events_in_local'] == 0) { + + if ($config['show_events_in_local'] == 0) { db_pandora_audit("ACL Violation", "Trying to access event viewer. View disabled due event replication."); ui_print_info_message('Event viewer is disabled due event replication. For more information, please contact with the administrator');