Commit c8a96a5c6f9c19a1080d726c595d7750b6cdd5c7
1 parent
774a2e52
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
admin/php/editormapfile.php
... | ... | @@ -1389,10 +1389,16 @@ function criarNovoEstilo() |
1389 | 1389 | } |
1390 | 1390 | function pegaItensLayer() |
1391 | 1391 | { |
1392 | - global $codigoMap,$locaplic,$codigoLayer; | |
1392 | + global $codigoMap,$locaplic,$codigoLayer,$postgis_mapa; | |
1393 | 1393 | $mapfile = $locaplic."/temas/".$codigoMap.".map"; |
1394 | 1394 | $mapa = ms_newMapObj($mapfile); |
1395 | 1395 | $layer = $mapa->getlayerbyname($codigoLayer); |
1396 | + $lcon = $layer->connection; | |
1397 | + if ($layer->connectiontype == MS_POSTGIS){ | |
1398 | + if (in_array($lcon,array_keys($postgis_mapa))){ | |
1399 | + $layer->set("connection",$postgis_mapa[$lcon]); | |
1400 | + } | |
1401 | + } | |
1396 | 1402 | $layer->open(); |
1397 | 1403 | $itens = $layer->getitems(); |
1398 | 1404 | $layer->close(); | ... | ... |