From fc00321facf2e816d36059285207aa63727661dd Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 12 Jul 2010 11:45:50 +0000 Subject: [PATCH] 2010-07-12 Sergio Martin * godmode/reporting/visual_console_builder.php: fixed the reset of the size when change a visual map background git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2988 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ .../godmode/reporting/visual_console_builder.php | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5ba3a978b3..b38130becd 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-07-12 Sergio Martin + + * godmode/reporting/visual_console_builder.php: fixed the + reset of the size when change a visual map background + 2010-07-12 Dario Rodriguez * operation/search_results.php: fixed bug in search with zero matches diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index b79e1adcaf..e521485195 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -47,6 +47,16 @@ switch ($activeTab) { $visualConsoleName = get_parameter('name'); $values = array('name' => $visualConsoleName, 'id_group' => $idGroup, 'background' => $background); + + // 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) { + $sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background); + $values['width'] = $sizeBackground[0]; + $values['height'] = $sizeBackground[1]; + } + switch ($action) { case 'update': $result = process_sql_update('tlayout', $values, array('id' => $idVisualConsole)); @@ -59,9 +69,6 @@ switch ($activeTab) { } break; case 'save': - $sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background); - $values['width'] = $sizeBackground[0]; - $values['height'] = $sizeBackground[1]; if($values['name'] != "" && $values['background']) $idVisualConsole = process_sql_insert('tlayout', $values);