Commit 6ddfa4c42cc5276b7bc2c6ae990dd0c5a803655c

Authored by Edmar Moretti
1 parent 814a24a0
Exists in master

Correção nas ferramentas de busca e busca rapida

classesphp/classe_atributos.php
@@ -763,25 +763,11 @@ class Atributos @@ -763,25 +763,11 @@ class Atributos
763 if($sopen == MS_FAILURE){ 763 if($sopen == MS_FAILURE){
764 return "erro"; 764 return "erro";
765 } 765 }
  766 + $l->close();
766 $ret = $this->mapa->extent; 767 $ret = $this->mapa->extent;
767 - /*  
768 - $prjMapa = $this->mapa->getProjection();  
769 - $prjTema = $l->getProjection();  
770 - if ($prjTema != ""){  
771 - $projInObj = ms_newprojectionobj($prjTema);  
772 - $projOutObj = ms_newprojectionobj($prjMapa);  
773 - }  
774 - */  
775 - /*  
776 - if (($prjTema != "") && ($prjMapa != $prjTema)) {  
777 - $status = $ret->project($projInObj, $projOutObj);  
778 - if($status !== MS_SUCCESS){  
779 - $ret = $this->mapa->extent;  
780 - }  
781 - }  
782 - */  
783 $fr = array(); 768 $fr = array();
784 if (@$l->queryByrect($ret) == MS_SUCCESS){ 769 if (@$l->queryByrect($ret) == MS_SUCCESS){
  770 + $l->open();
785 $res_count = $l->getNumresults(); 771 $res_count = $l->getNumresults();
786 $palavra = $this->remove_accents(strtolower($palavra)); 772 $palavra = $this->remove_accents(strtolower($palavra));
787 for ($i = 0; $i < $res_count; ++$i) { 773 for ($i = 0; $i < $res_count; ++$i) {
classesphp/funcoes_gerais.php
@@ -1072,24 +1072,21 @@ Retorno: @@ -1072,24 +1072,21 @@ Retorno:
1072 1072
1073 {array} | "erro" 1073 {array} | "erro"
1074 */ 1074 */
1075 -function buscaRapida($servico,$palavra)  
1076 -{ 1075 +function buscaRapida($servico,$palavra){
1077 //error_reporting(0); 1076 //error_reporting(0);
1078 - if(!function_exists('preg_match'))  
1079 - { 1077 + if(!function_exists('preg_match')){
1080 include_once(dirname(__FILE__).'/../pacotes/SOAPdepreciado/nusoap.php'); 1078 include_once(dirname(__FILE__).'/../pacotes/SOAPdepreciado/nusoap.php');
1081 new Xsoapclient($servico."?wsdl","wsdl"); 1079 new Xsoapclient($servico."?wsdl","wsdl");
1082 } 1080 }
1083 - else  
1084 - { 1081 + else{
1085 include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php'); 1082 include_once(dirname(__FILE__).'/../pacotes/SOAP/nusoap.php');
1086 $soapclient = new nusoap_client($servico); 1083 $soapclient = new nusoap_client($servico);
1087 } 1084 }
1088 -//echo $soapclient->getDebug();  
1089 -//exit;  
1090 $vv = "erro"; 1085 $vv = "erro";
1091 $vv = $soapclient->call("procurar",array("palavra"=>$palavra,"tipoBusca"=>"qualquer")); 1086 $vv = $soapclient->call("procurar",array("palavra"=>$palavra,"tipoBusca"=>"qualquer"));
1092 - if($vv == ""){$vv = "erro";} 1087 + if($vv == ""){
  1088 + $vv = "erro";
  1089 + }
1093 return ($vv); 1090 return ($vv);
1094 } 1091 }
1095 /* 1092 /*
classesphp/mapa_controle.php
@@ -1847,8 +1847,7 @@ switch (strtoupper($funcao)) @@ -1847,8 +1847,7 @@ switch (strtoupper($funcao))
1847 case "BUSCARAPIDA": 1847 case "BUSCARAPIDA":
1848 $servico = $_pg["servico"]; 1848 $servico = $_pg["servico"];
1849 $palavra = $_pg["palavra"]; 1849 $palavra = $_pg["palavra"];
1850 - if($servico != "temas")  
1851 - { 1850 + if($servico != "temas"){
1852 $retorno = buscaRapida($servico,$palavra); 1851 $retorno = buscaRapida($servico,$palavra);
1853 } 1852 }
1854 else{ 1853 else{
@@ -1866,8 +1865,8 @@ switch (strtoupper($funcao)) @@ -1866,8 +1865,8 @@ switch (strtoupper($funcao))
1866 } 1865 }
1867 } 1866 }
1868 } 1867 }
1869 - else  
1870 - {$retorno = "erro"; 1868 + else {
  1869 + $retorno = "erro";
1871 } 1870 }
1872 } 1871 }
1873 break; 1872 break;
ferramentas/busca/index.js
@@ -236,7 +236,16 @@ i3GEOF.busca = { @@ -236,7 +236,16 @@ i3GEOF.busca = {
236 cp = new cpaint(); 236 cp = new cpaint();
237 cp.set_response_type("json"); 237 cp.set_response_type("json");
238 cp.set_transfer_mode('POST'); 238 cp.set_transfer_mode('POST');
239 - cp.call(p,"listavaloresitens",i3GEOF.busca.mostraBusca,"funcao=listavaloresitens","palavra="+palavra,"lista="+listai.join("|"),"tipo="+tipo,"onde="+onde,"ext="+i3GEO.parametros.mapexten); 239 + cp.call(
  240 + p,
  241 + "listavaloresitens",
  242 + i3GEOF.busca.mostraBusca,
  243 + "funcao=listavaloresitens&palavra="+palavra
  244 + +"&lista="+listai.join("|")
  245 + +"&tipo="+tipo
  246 + +"&onde="+onde
  247 + +"&ext="+i3GEO.parametros.mapexten
  248 + );
240 } 249 }
241 } 250 }
242 }, 251 },
ferramentas/melhorcaminho/exec.php
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 include_once(dirname(__FILE__)."/../safe.php"); 2 include_once(dirname(__FILE__)."/../safe.php");
3 if($statusFerramentas["melhorcaminho"] != true){ 3 if($statusFerramentas["melhorcaminho"] != true){
4 exit; 4 exit;
5 -); 5 +}
6 // 6 //
7 //faz a busca da fun&ccedil;&atilde;o que deve ser executada 7 //faz a busca da fun&ccedil;&atilde;o que deve ser executada
8 // 8 //
@@ -241,4 +241,4 @@ if(isset($map_file) &amp;&amp; isset($postgis_mapa) &amp;&amp; $map_file != &quot;&quot;){ @@ -241,4 +241,4 @@ if(isset($map_file) &amp;&amp; isset($postgis_mapa) &amp;&amp; $map_file != &quot;&quot;){
241 restauraCon($map_file,$postgis_mapa); 241 restauraCon($map_file,$postgis_mapa);
242 } 242 }
243 cpjson($retorno); 243 cpjson($retorno);
244 -?> 244 +?>
245 \ No newline at end of file 245 \ No newline at end of file