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);