Commit 507976a61f0c1d446b978890c04670572e5e48c5
1 parent
77dd5320
Exists in
master
and in
7 other branches
Correção na montagem da expressão de seleção quando se usa querybyattributes na …
…versão 7 do Mapserver
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesphp/classe_selecao.php
@@ -518,8 +518,8 @@ $valor - Valor. | @@ -518,8 +518,8 @@ $valor - Valor. | ||
518 | $shpi = array(); | 518 | $shpi = array(); |
519 | 519 | ||
520 | $filtro = str_replace("|","'",$filtro); | 520 | $filtro = str_replace("|","'",$filtro); |
521 | - if ($this->layer->connectiontype == MS_POSTGIS) | ||
522 | - { | 521 | + |
522 | + if ($this->layer->connectiontype == MS_POSTGIS && $this->v < 7) { | ||
523 | $filtro = str_replace("'[","",$filtro); | 523 | $filtro = str_replace("'[","",$filtro); |
524 | $filtro = str_replace("[","",$filtro); | 524 | $filtro = str_replace("[","",$filtro); |
525 | $filtro = str_replace("]'","",$filtro); | 525 | $filtro = str_replace("]'","",$filtro); |
@@ -527,8 +527,8 @@ $valor - Valor. | @@ -527,8 +527,8 @@ $valor - Valor. | ||
527 | $filtro = str_replace("("," ",$filtro); | 527 | $filtro = str_replace("("," ",$filtro); |
528 | $filtro = str_replace(")"," ",$filtro); | 528 | $filtro = str_replace(")"," ",$filtro); |
529 | } | 529 | } |
530 | - $teste = $this->layer->querybyattributes($items[0],$filtro,1); | ||
531 | 530 | ||
531 | + $teste = $this->layer->querybyattributes($items[0],$filtro,1); | ||
532 | if($teste != MS_SUCCESS){ | 532 | if($teste != MS_SUCCESS){ |
533 | $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"), 1); | 533 | $teste = $this->layer->queryByAttributes($items[0], mb_convert_encoding($filtro,"ISO-8859-1","UTF-8"), 1); |
534 | } | 534 | } |