From d9cac2f700830586b23f81f3f282433a54fc1dd1 Mon Sep 17 00:00:00 2001 From: darode Date: Mon, 12 Jul 2010 14:03:04 +0000 Subject: [PATCH] 2010-07-12 Dario Rodriguez * godmode/reporting/visual_console_builder.php: fixed error getting image size creating a map without background Fixes: #3014276 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2990 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ .../godmode/reporting/visual_console_builder.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c61373646a..65307b02ab 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-07-12 Dario Rodriguez + + * godmode/reporting/visual_console_builder.php: fixed error getting + image size creating a map without background + Fixes: #3014276 + 2010-07-12 Miguel de Dios * operation/agentes/ver_agente.php: re-ordered the tabs. diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index e521485195..9b7519c8fc 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -51,7 +51,7 @@ switch ($activeTab) { // If the background is changed the size is reseted $visualConsole = get_db_row_filter('tlayout', array('id' => $idVisualConsole)); $background_now = $visualConsole['background']; - if($background_now != $background) { + if($background_now != $background && $background) { $sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background); $values['width'] = $sizeBackground[0]; $values['height'] = $sizeBackground[1]; @@ -60,7 +60,7 @@ switch ($activeTab) { switch ($action) { case 'update': $result = process_sql_update('tlayout', $values, array('id' => $idVisualConsole)); - if ($result !== false) { + if ($result !== false && $values['background']) { $action = 'edit'; $statusProcessInDB = array('flag' => true, 'message' => '

'.__('Successfully update.').'

'); }