From a9bfeed7341a58953316eba86493ccd97d85dd2f Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 2 Oct 2014 15:02:01 +0000 Subject: [PATCH] --- admin/admin.db | Bin 263168 -> 0 bytes classesphp/classe_atributos.php | 1 + classesphp/funcoes_gerais.php | 12 +++++++----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index 649fd43..54b46a4 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index 8b54189..7c6f17d 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -488,6 +488,7 @@ class Atributos $shp_atual[$i] = $shapes[$i];; } $chk = ""; + if (@$this->layer->queryByrect($this->mapa->extent) == MS_SUCCESS){ $res_count = $this->layer->getNumresults(); $totalGeral = $res_count; diff --git a/classesphp/funcoes_gerais.php b/classesphp/funcoes_gerais.php index dc33f80..3cc74c1 100644 --- a/classesphp/funcoes_gerais.php +++ b/classesphp/funcoes_gerais.php @@ -1479,7 +1479,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) $dbname = $nomeshp.".dbf"; $reg = array(); $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); - + $res_count = count($shapesSel); if ($res_count > 0){ for ($i = 0; $i < $res_count; ++$i){ @@ -2468,10 +2468,10 @@ function retornaShapesMapext($objLayer,$objMapa){ function retornaShapesSelecionados($objLayer,$map_file,$objMapa){ $shapes = array(); $qyfile = dirname($map_file)."/".$objLayer->name.".php"; - + if(!file_exists($qyfile)) {return $shapes;} - + $handle = fopen ($qyfile, "r"); $conteudo = fread ($handle, filesize ($qyfile)); fclose ($handle); @@ -2479,12 +2479,14 @@ function retornaShapesSelecionados($objLayer,$map_file,$objMapa){ //echo count($listaDeIndices);exit; if(count($listaDeIndices) == 0) {return $shapes;} - + $versao = versao(); $versao = $versao["principal"]; + if ($objLayer->connectiontype != MS_POSTGIS){ //pega os shapes selecionados carregaquery2($map_file,$objLayer,$objMapa); + $sopen = $objLayer->open(); if($sopen == MS_FAILURE){return "erro";} $objLayer->open(); @@ -2492,7 +2494,7 @@ function retornaShapesSelecionados($objLayer,$map_file,$objMapa){ $centroides = array(); $shapes = array(); //pega um shape especifico - + for ($i = 0; $i < $res_count; ++$i) { if($versao == 6) -- libgit2 0.21.2