diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index a6f282d2cf..fee2b9d723 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -243,10 +243,15 @@ switch ($action) { $map_default_altitude = get_parameter('map_default_altitude'); $map_group_id = get_parameter('map_group_id'); $map_levels_zoom = get_parameter('map_levels_zoom', 16); - $map_connection_list_temp = explode(',', get_parameter('map_connection_list')); + $map_connection_list_temp_string = implode(',', $map_connection_list_temp); + if (strlen($map_connection_list_temp_string) > 0) { + $where_map_connection = ' WHERE id_tmap_connection IN('.$map_connection_list_temp_string.')'; + } else { + $where_map_connection = ''; + } - $listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection'); + $listConnectionTemp = db_get_all_rows_sql('SELECT id_tmap_connection, conection_name, group_id FROM tgis_map_connection'.$where_map_connection); foreach ($map_connection_list_temp as $index => $value) { $cleanValue = trim($value); @@ -256,7 +261,6 @@ switch ($action) { } $map_connection_default = get_parameter('map_connection_default'); - $map_connection_list = []; foreach ($listConnectionTemp as $idMapConnection) { $default = 0; @@ -345,7 +349,7 @@ function deleteConnectionMap(idConnectionMap) { checked = $("#radiobtn0001", $("#map_connection_" + idConnectionMap)).attr('checked'); $("#map_connection_" + idConnectionMap).remove(); - + if (checked) { //Checked first, but not is index = 0 maybe. @@ -485,7 +489,7 @@ foreach ($listConnectionTemp as $connectionTemp) { $table->data[1][0] = __('Add Map connection').$iconError; $table->data[1][1] = " - - +
".html_print_select($listConnection, 'map_connection_list', '', '', '', '0', true)." + ".html_print_select($listConnection, 'select-map_connection_list', '', '', '', '0', true)." ".html_print_image( diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php index ba9116759b..b57ec9e9ff 100644 --- a/pandora_console/include/functions_gis.php +++ b/pandora_console/include/functions_gis.php @@ -1585,7 +1585,7 @@ function gis_add_conection_maps_in_form($map_connection_list)
'.html_print_input_text('map_connection_name_'.$mapConnection['id_conection'], $mapConnectionRowDB['conection_name'], '', 20, 40, true, true).' '.$radioButton.''.html_print_image('images/delete.svg', true, ['alt' => '', 'class' => 'invert_filter']).''.html_print_image('images/delete.svg', true, ['alt' => '', 'class' => 'invert_filter main_menu_icon']).'