Commit 066fdc0d33e65e5e463812c4b047d55ef2e66561
1 parent
f03f0612
Exists in
master
and in
7 other branches
Correção da função autoclasses, incluindo a operação de substituição de string d…
…e conexão com o BD quando necessário
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
classesphp/funcoes_gerais.php
| ... | ... | @@ -1861,6 +1861,17 @@ Objeto layer modificado |
| 1861 | 1861 | */ |
| 1862 | 1862 | function autoClasses(&$nlayer,$mapa) |
| 1863 | 1863 | { |
| 1864 | + $postgis_mapa = ""; | |
| 1865 | + $substituicon = "nao"; | |
| 1866 | + include_once("../ms_configura.php"); | |
| 1867 | + if ($nlayer->connectiontype == MS_POSTGIS) | |
| 1868 | + { | |
| 1869 | + if ($nlayer->connection == " ") | |
| 1870 | + { | |
| 1871 | + $nlayer->set("connection",$postgis_mapa); | |
| 1872 | + $substituicon = "sim"; | |
| 1873 | + } | |
| 1874 | + } | |
| 1864 | 1875 | if($nlayer->getmetadata("classesitem") == "") |
| 1865 | 1876 | {return;} |
| 1866 | 1877 | $itemnome = $nlayer->getmetadata("classesnome"); |
| ... | ... | @@ -1951,6 +1962,7 @@ function autoClasses(&$nlayer,$mapa) |
| 1951 | 1962 | $classeoriginal->set("status",MS_DELETE); |
| 1952 | 1963 | } |
| 1953 | 1964 | } |
| 1965 | + if($substituicon == "sim"){$nlayer->set("connection"," ");} | |
| 1954 | 1966 | return; |
| 1955 | 1967 | } |
| 1956 | 1968 | ?> |
| 1957 | 1969 | \ No newline at end of file | ... | ... |