Commit 5d8e5b4d65d7c1887dd908b7bb252835074a5856

Authored by Edmar Moretti
1 parent d3751052

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.
classesphp/funcoes_gerais.php
... ... @@ -598,7 +598,7 @@ function substituiCon($map_file,$postgis_mapa)
598 598 {
599 599 if (isset($postgis_mapa))
600 600 {
601   - if ($postgis_mapa != "")
  601 + if (($postgis_mapa != "") && ($postgis_mapa != " "))
602 602 {
603 603 $objMap = ms_newMapObj($map_file);
604 604 $numlayers = $objMap->numlayers;
... ...
ferramentas/carregamapa/upload.php
... ... @@ -29,6 +29,7 @@ Free Software Foundation, Inc., no endereço
29 29 */
30 30  
31 31 require_once("../../classesphp/pega_variaveis.php");
  32 +require_once("../../classesphp/funcoes_gerais.php");
32 33 error_reporting(0);
33 34 session_name("i3GeoPHP");
34 35 if (isset($g_sid))
... ... @@ -67,6 +68,8 @@ if (isset($_FILES['filemap']['name']))
67 68 if($status == 1)
68 69 {
69 70 echo "<p>Arquivo enviado. Verificando o mapa...</p>";
  71 + substituiCon($map_file,$postgis_mapa);
  72 + substituiCon($dirmap."/".$Arquivo,$postgis_mapa);
70 73 $mapt = ms_newMapObj($dirmap."/".$Arquivo);
71 74 $map = ms_newMapObj($map_file);
72 75 //apaga os layers do mapa atual
... ...
ms_configura.php
... ... @@ -118,6 +118,6 @@ else //se for linux
118 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 119 $postgis_con = "user=geodados password=geodados dbname=geodados host=mapas.mma.gov.br port=5432";
120 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 ?>
... ...