Fixed the delete events in metaconsole. TICKET: #2016

This commit is contained in:
mdtrooper 2015-03-18 17:57:04 +01:00
parent cb845a0a9b
commit c525de71fd
1 changed files with 19 additions and 6 deletions

View File

@ -25,8 +25,6 @@ require_once ($config['homedir'].'/include/functions_ui.php');
check_login ();
enterprise_hook('open_meta_frame');
if (! check_acl ($config["id_user"], 0, "ER")) {
db_pandora_audit("ACL Violation",
"Trying to access event viewer");
@ -44,15 +42,11 @@ if (enterprise_installed() && defined("METACONSOLE")) {
$history = (bool) get_parameter('history', 0);
$readonly = false;
if (!$meta) {
if (isset($config['event_replication']) &&
$config['event_replication'] == 1) {
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(array('message' => __('Event viewer is disabled due event replication. For more information, please contact with the administrator'), 'no_close' => true));
return;
}
else {
@ -61,6 +55,7 @@ if (!$meta) {
}
}
if (is_ajax ()) {
$get_event_tooltip = (bool) get_parameter ('get_event_tooltip');
$validate_event = (bool) get_parameter ('validate_event');
@ -127,6 +122,7 @@ if (is_ajax ()) {
$similars = (bool) get_parameter ('similars');
$return = events_delete_event ($id, $similars, $meta, $history);
if ($return)
echo 'ok';
else
@ -180,6 +176,23 @@ if (is_ajax ()) {
return;
}
enterprise_hook('open_meta_frame');
if (!$meta) {
if (isset($config['event_replication']) &&
$config['event_replication'] == 1) {
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(array('message' => __('Event viewer is disabled due event replication. For more information, please contact with the administrator'), 'no_close' => true));
return;
}
else {
$readonly = true;
}
}
}
$offset = (int) get_parameter ("offset", 0);
$id_group = (int) get_parameter('id_group', 0);//0 all