From b7889ca4d27aeda20f152bbd9778c6e1541566a2 Mon Sep 17 00:00:00 2001 From: marostegui Date: Tue, 21 Oct 2008 13:39:47 +0000 Subject: [PATCH] 2008-10-21 Manuel Arostegui * operation/menu.php: Fixed warning message if no layouts were defined on the visual console. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1180 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/operation/menu.php | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 661552a9f2..108482fce0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2008-10-21 Manuel Arostegui + + * operation/menu.php: Fixed warning message if no layouts were defined + on the visual console. + 2008-10-21 Esteban Sanchez * include/functions.php: Improved human_time_comparation() so it won't diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 128ef5fdcd..f4841945f3 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -97,15 +97,18 @@ if (give_acl ($config['id_user'], 0, "AR")) { } echo '
'; echo '
'; + echo ''.__('Visual console').''; if ($sec == "visualc") { - $result = get_db_all_rows_in_table ('tlayout','name'); + $layouts = get_db_all_rows_in_table ('tlayout', 'name'); + if ($layouts === false) + $layouts = array (); $id = get_parameter ('id'); - foreach ($result as $layout) { - if (!give_acl ($config["id_user"], $layout["id_group"], "AR")) { + foreach ($layouts as $layout) { + if (! give_acl ($config["id_user"], $layout["id_group"], "AR")) { continue; - } elseif ($sec2 == "operation/visual_console/render_view" && $id == $layout["id"]) { + } + if ($sec2 == "operation/visual_console/render_view" && $id == $layout["id"]) { echo "