Commit 14e18472439ae6444fea67adb159bee02a723fe4
1 parent
8ad8c649
Exists in
master
and in
7 other branches
Removida coluna the_geom da string de select
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
admin/php/parsemapfile.php
... | ... | @@ -259,6 +259,10 @@ function mapfile() |
259 | 259 | $layer = $mapa->getlayerbyname($layer); |
260 | 260 | $xml .= "<titulo>".$layer->getmetadata('tema')."</titulo>\n"; |
261 | 261 | $d = $layer->data; |
262 | + if (@$layer->open() == MS_SUCCESS) | |
263 | + {$colunas = implode(",",$layer->getItems());} | |
264 | + else | |
265 | + {$colunas = "*";} | |
262 | 266 | $ct = $objcontype[$layer->connectiontype]; |
263 | 267 | $tagLegenda = "parsemapfile.php?id=".$codigoLayer."&layername=".$layer->name."&tipoparse=legenda"; |
264 | 268 | $nomeLayer = $layer->name; |
... | ... | @@ -314,7 +318,10 @@ function mapfile() |
314 | 318 | $xml .= "</connection>\n"; |
315 | 319 | $d = explode("(",$d); |
316 | 320 | $d = explode(")",$d[1]); |
317 | - $xml .= "<select>$d[0]</select>\n"; | |
321 | + $dstring = $d[0]; | |
322 | + $dstring = str_replace("the_geom","",$dstring); | |
323 | + $dstring = str_replace("*",$colunas,$dstring); | |
324 | + $xml .= "<select>$dstring</select>\n"; | |
318 | 325 | $string = preg_replace('/.*from\s*(.+).*/i', '\1', $d[0]); |
319 | 326 | $s = explode("WHERE",$string); |
320 | 327 | if(count($s) == 1) | ... | ... |