Commit c0cf4a99153de55116f38d45742353cb0b63bc93

Authored by Edmar Moretti
1 parent 73ea1457

Correção na verificação da substituição de conexão

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
testamapfile.php
@@ -93,7 +93,7 @@ if (isset($map) && $map != "") @@ -93,7 +93,7 @@ if (isset($map) && $map != "")
93 } 93 }
94 function verifica($map) 94 function verifica($map)
95 { 95 {
96 - global $tipo,$locaplic; 96 + global $tipo,$locaplic,$postgis_mapa;
97 if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png")) 97 if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png"))
98 { 98 {
99 Header("Content-type: image/png"); 99 Header("Content-type: image/png");
@@ -137,6 +137,13 @@ function verifica($map) @@ -137,6 +137,13 @@ function verifica($map)
137 { 137 {
138 $layern = $nmapa->getLayerByName($teman); 138 $layern = $nmapa->getLayerByName($teman);
139 $layern->set("status",MS_DEFAULT); 139 $layern->set("status",MS_DEFAULT);
  140 + if ($layern->connectiontype == MS_POSTGIS)
  141 + {
  142 + if ($layern->connection == " ")
  143 + {
  144 + $layern->set("connection",$postgis_mapa);
  145 + }
  146 + }
140 autoClasses(&$layern,$nmapa); 147 autoClasses(&$layern,$nmapa);
141 ms_newLayerObj($mapa, $layern); 148 ms_newLayerObj($mapa, $layern);
142 if ($layern->data == "") 149 if ($layern->data == "")