From 0e16e2e14b43504fb4ed5990f8f50713baa73cd4 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 12 Mar 2012 18:00:03 +0000 Subject: [PATCH] 2012-03-12 Juan Manuel Ramon * general/shortcut_bar.php: Fixed Ajax callbacks in this view. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5743 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 4 ++++ pandora_console/general/shortcut_bar.php | 17 +++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 628f4af193..463ce3a6b3 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2012-03-12 Juan Manuel Ramon + + * general/shortcut_bar.php: Fixed Ajax callbacks in this view. + 2012-03-12 Juan Manuel Ramon * include/functions_ui.php: Skin is not used on logon error. diff --git a/pandora_console/general/shortcut_bar.php b/pandora_console/general/shortcut_bar.php index a3a445774c..7c8c8c0e7b 100644 --- a/pandora_console/general/shortcut_bar.php +++ b/pandora_console/general/shortcut_bar.php @@ -43,15 +43,6 @@ if (is_ajax()){ } } - return; -} -$shortcut_state = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $config['id_user'])); - -// If shortcut bar is disabled return to index.php -if ($shortcut_state == 0) - return; - -if (is_ajax()) { require_once("include/functions_events.php"); @@ -67,6 +58,7 @@ if (is_ajax()) { // Get critical events (realtime update) if ($get_critical_events){ + $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) @@ -116,10 +108,15 @@ if (is_ajax()) { $shortcut_incidents = $result_incidents_update[0]['total_incidents']; echo $shortcut_incidents; - } + } return; } +$shortcut_state = db_get_value_filter('shortcut', 'tusuario', array('id_user' => $config['id_user'])); + +// If shortcut bar is disabled return to index.php +if ($shortcut_state == 0) + return; if ($shortcut_state == 2) { echo "
";