From d02eeffd368231716a8b364e691e03d0b3b854d0 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 29 Apr 2010 14:32:22 +0000 Subject: [PATCH] 2010-04-29 Sergio Martin * godmode/setup/gis_step_2.php: Fixed the creation of map connection without name and without type of connection. Bug:2993713 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2638 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/godmode/setup/gis_step_2.php | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 44676647f8..e481f8387c 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2010-04-29 Sergio Martin + + * godmode/setup/gis_step_2.php: Fixed the creation + of map connection without name and without type + of connection. Bug:2993713 + 2010-04-29 Sergio Martin * godmode/servers/manage_recontask.php: Fixed the creation diff --git a/pandora_console/godmode/setup/gis_step_2.php b/pandora_console/godmode/setup/gis_step_2.php index 0bdfc7c735..0753091c3f 100755 --- a/pandora_console/godmode/setup/gis_step_2.php +++ b/pandora_console/godmode/setup/gis_step_2.php @@ -126,13 +126,14 @@ switch ($action) { } //TODO VALIDATE PARAMETERS - - saveMapConnection($mapConnection_name, $mapConnection_group, - $mapConnection_numLevelsZoom, $mapConnection_defaultZoom, - $mapConnection_defaultLatitude, $mapConnection_defaultLongitude, - $mapConnection_defaultAltitude, $mapConnection_centerLatitude, - $mapConnection_centerLongitude, $mapConnection_centerAltitude, - $mapConnectionData, $idConnectionMap); + if ($mapConnection_name != "" && $mapConnection_type != 0) { + saveMapConnection($mapConnection_name, $mapConnection_group, + $mapConnection_numLevelsZoom, $mapConnection_defaultZoom, + $mapConnection_defaultLatitude, $mapConnection_defaultLongitude, + $mapConnection_defaultAltitude, $mapConnection_centerLatitude, + $mapConnection_centerLongitude, $mapConnection_centerAltitude, + $mapConnectionData, $idConnectionMap); + } require_once('gis.php'); return; @@ -160,12 +161,11 @@ print_table($table); $table->width = '60%'; $table->data = array(); -$types[0] = __('Please select the connection type'); $types["OSM"] = __('Open Street Maps'); $types["Gmap"] = __('Google Maps'); $types["Static_Image"] = __('Static Image'); $table->data[0][0] = __('Type') . ":"; -$table->data[0][1] = print_select($types, 'sel_type', $mapConnection_type, "selMapConnectionType();", '', 0, true); +$table->data[0][1] = print_select($types, 'sel_type', $mapConnection_type, "selMapConnectionType();", __('Please select the connection type'), 0, true); echo "

" . __('Map connection type') . "

"; print_table ($table);