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 93 }
94 94 function verifica($map)
95 95 {
96   - global $tipo,$locaplic;
  96 + global $tipo,$locaplic,$postgis_mapa;
97 97 if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png"))
98 98 {
99 99 Header("Content-type: image/png");
... ... @@ -137,6 +137,13 @@ function verifica($map)
137 137 {
138 138 $layern = $nmapa->getLayerByName($teman);
139 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 147 autoClasses(&$layern,$nmapa);
141 148 ms_newLayerObj($mapa, $layern);
142 149 if ($layern->data == "")
... ...