From 13e3a2163d87a0328a92f4e583503ab8a9ec286a Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 21 Jul 2011 09:24:41 +0000 Subject: [PATCH] 2011-07-21 Sergio Martin * include/functions_graph.php: Set default values to width and height parameters in purge graph. * godmode/setup/os.list.php godmode/users/profile_list.php: Fixed typica bugs of foreach with no array variable git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4609 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ pandora_console/godmode/setup/os.list.php | 3 +++ pandora_console/godmode/users/profile_list.php | 3 +++ pandora_console/include/functions_graph.php | 2 +- 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8e6b993dcf..8b2389e06e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2011-07-21 Sergio Martin + + * include/functions_graph.php: Set default values to width and height + parameters in purge graph. + + * godmode/setup/os.list.php + godmode/users/profile_list.php: Fixed typica bugs of foreach with + no array variable + 2011-07-21 Ramon Novoa * DEBIAN/control: Removed php5-zlib (zlib comes with the default PHP diff --git a/pandora_console/godmode/setup/os.list.php b/pandora_console/godmode/setup/os.list.php index 6abcb57b01..1eef5dfffd 100644 --- a/pandora_console/godmode/setup/os.list.php +++ b/pandora_console/godmode/setup/os.list.php @@ -38,6 +38,9 @@ $table->size[0] = '20px'; $table->size[4] = '20px'; $osList = db_get_all_rows_in_table('tconfig_os'); +if($osList === false) { + $osList = array(); +} $table->data = array(); foreach ($osList as $os) { diff --git a/pandora_console/godmode/users/profile_list.php b/pandora_console/godmode/users/profile_list.php index 7fd91b4e0e..a07ce953da 100644 --- a/pandora_console/godmode/users/profile_list.php +++ b/pandora_console/godmode/users/profile_list.php @@ -75,6 +75,9 @@ $table->align = array_fill (1, 11, "center"); $table->size = array_fill (1, 10, 40); $profiles = db_get_all_rows_in_table ("tperfil"); +if($profiles === false) { + $profiles = array(); +} $img = html_print_image ("images/ok.png", true, array ("border" => 0)); diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 87c2c6b676..93ce7298d8 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -825,7 +825,7 @@ function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek * @param integer width pie graph width * @param integer height pie graph height */ -function grafico_db_agentes_purge ($id_agent, $width, $height) { +function grafico_db_agentes_purge ($id_agent, $width = 380, $height = 300) { global $config; global $graphic_type;