Commit 5d8e5b4d65d7c1887dd908b7bb252835074a5856
1 parent
d3751052
Exists in
master
and in
7 other branches
Corrigido bug nas operações de salvar e recarregar um mapa. A string de conexão …
…com o banco de dados não estava sendo substituida corretamente.
Showing
3 changed files
with
5 additions
and
2 deletions
Show diff stats
classesphp/funcoes_gerais.php
@@ -598,7 +598,7 @@ function substituiCon($map_file,$postgis_mapa) | @@ -598,7 +598,7 @@ function substituiCon($map_file,$postgis_mapa) | ||
598 | { | 598 | { |
599 | if (isset($postgis_mapa)) | 599 | if (isset($postgis_mapa)) |
600 | { | 600 | { |
601 | - if ($postgis_mapa != "") | 601 | + if (($postgis_mapa != "") && ($postgis_mapa != " ")) |
602 | { | 602 | { |
603 | $objMap = ms_newMapObj($map_file); | 603 | $objMap = ms_newMapObj($map_file); |
604 | $numlayers = $objMap->numlayers; | 604 | $numlayers = $objMap->numlayers; |
ferramentas/carregamapa/upload.php
@@ -29,6 +29,7 @@ Free Software Foundation, Inc., no endereço | @@ -29,6 +29,7 @@ Free Software Foundation, Inc., no endereço | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | require_once("../../classesphp/pega_variaveis.php"); | 31 | require_once("../../classesphp/pega_variaveis.php"); |
32 | +require_once("../../classesphp/funcoes_gerais.php"); | ||
32 | error_reporting(0); | 33 | error_reporting(0); |
33 | session_name("i3GeoPHP"); | 34 | session_name("i3GeoPHP"); |
34 | if (isset($g_sid)) | 35 | if (isset($g_sid)) |
@@ -67,6 +68,8 @@ if (isset($_FILES['filemap']['name'])) | @@ -67,6 +68,8 @@ if (isset($_FILES['filemap']['name'])) | ||
67 | if($status == 1) | 68 | if($status == 1) |
68 | { | 69 | { |
69 | echo "<p>Arquivo enviado. Verificando o mapa...</p>"; | 70 | echo "<p>Arquivo enviado. Verificando o mapa...</p>"; |
71 | + substituiCon($map_file,$postgis_mapa); | ||
72 | + substituiCon($dirmap."/".$Arquivo,$postgis_mapa); | ||
70 | $mapt = ms_newMapObj($dirmap."/".$Arquivo); | 73 | $mapt = ms_newMapObj($dirmap."/".$Arquivo); |
71 | $map = ms_newMapObj($map_file); | 74 | $map = ms_newMapObj($map_file); |
72 | //apaga os layers do mapa atual | 75 | //apaga os layers do mapa atual |
ms_configura.php
@@ -118,6 +118,6 @@ else //se for linux | @@ -118,6 +118,6 @@ else //se for linux | ||
118 | $R_path = "R";//se vc não instalou o R no seu servidor, tente o endereço $R_path = $locaplic."/pacotes/r/linux/r"; | 118 | $R_path = "R";//se vc não instalou o R no seu servidor, tente o endereço $R_path = $locaplic."/pacotes/r/linux/r"; |
119 | $postgis_con = "user=geodados password=geodados dbname=geodados host=mapas.mma.gov.br port=5432"; | 119 | $postgis_con = "user=geodados password=geodados dbname=geodados host=mapas.mma.gov.br port=5432"; |
120 | $srid_area = 1; | 120 | $srid_area = 1; |
121 | - $postgis_mapa = "user=geodados password=geodados dbname=geodados host=10.1.1.36 port=5432"; | 121 | + $postgis_mapa = ""; |
122 | } | 122 | } |
123 | ?> | 123 | ?> |