From fae8e9690e09f27fc6225d4f0204ef8bac8e6387 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Thu, 15 Sep 2011 20:53:53 +0000 Subject: [PATCH] Remoção da passagem de valor por referência na chamada de funções (operação depreciada no PHP) --- admin/admin.db | Bin 75776 -> 0 bytes admin/php/parsemapfile.php | 8 +++++--- admin/php/xml.php | 2 +- classesphp/classe_analise.php | 22 +++++++++++----------- classesphp/classe_atributos.php | 6 +++--- classesphp/classe_mapa.php | 4 ++-- classesphp/classe_shp.php | 2 +- classesphp/classe_temas.php | 4 ++-- classesphp/funcoes_gerais.php | 24 ++++++++++++++++++++++-- classesphp/graficos.php | 4 ++-- classesphp/mapa_googleearth.php | 5 +++-- classesphp/mapa_googlemaps.php | 15 ++++++++------- classesphp/mapa_openlayers.php | 15 ++++++++------- classesphp/parse_cgi.php | 2 +- ferramentas/tabela/relatorio.php | 6 ++---- geraminiatura.php | 4 ++-- ms_criamapa.php | 8 ++++---- ogc.php | 2 +- testamapfile.php | 4 ++-- 19 files changed, 80 insertions(+), 57 deletions(-) diff --git a/admin/admin.db b/admin/admin.db index e6cc838..0b70e36 100644 Binary files a/admin/admin.db and b/admin/admin.db differ diff --git a/admin/php/parsemapfile.php b/admin/php/parsemapfile.php index 500716e..459c90c 100644 --- a/admin/php/parsemapfile.php +++ b/admin/php/parsemapfile.php @@ -396,7 +396,7 @@ function mapfile() $xml .= "$layer->sizeunits\n"; $xml .= "$layer->getProjection\n"; $xml .= "\n"; - $xml .= pegaClasses(&$xml); + $xml = pegaClasses($xml); $xml .= "\n"; } $xml .= ""; @@ -421,12 +421,13 @@ function pegaClasses($xml) $xml .= "$classe->symbolname\n"; $xml .= "$classe->type\n"; $xml .= "\n"; - pegaEstilos($xml,$classe); + $xml = pegaEstilos($xml,$classe); $xml .= "\n"; $xml .= "\n"; } + return $xml; } -function pegaEstilos(&$xml,$classe) +function pegaEstilos($xml,$classe) { $numestilos = $classe->numstyles; $estilos = array(); @@ -441,6 +442,7 @@ function pegaEstilos(&$xml,$classe) $xml .= "".$estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue."\n"; $xml .= "\n"; } + return $xml; } ?> \ No newline at end of file diff --git a/admin/php/xml.php b/admin/php/xml.php index a42163b..159f846 100644 --- a/admin/php/xml.php +++ b/admin/php/xml.php @@ -94,7 +94,7 @@ function geraXmlSistemas($perfil,$locaplic,$editores) $xml .= " ".$row["perfil_sistema"]."\n"; $xml .= " ".$row["publicado_sistema"]."\n"; $xml .= " ".xmlTexto_prepara($row["nome_sistema"])."\n"; - geraXmlSistemas_pegafuncoes($perfil,&$xml,$row["id_sistema"],$dbh); + geraXmlSistemas_pegafuncoes($perfil,$xml,$row["id_sistema"],$dbh); $xml .= "\n"; } } diff --git a/classesphp/classe_analise.php b/classesphp/classe_analise.php index d523cc4..5037447 100644 --- a/classesphp/classe_analise.php +++ b/classesphp/classe_analise.php @@ -1023,7 +1023,7 @@ $locaplic - Localização do I3geo. $nomeshp = $this->diretorio."/".$nomefinal; //pega os shapes selecionados $itemspt = pegaItens($layerPt); - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); if ($existesel == "nao") {$layerPt->queryByrect($this->mapa->extent);} $res_count = $layerPt->getNumresults(); @@ -1194,7 +1194,7 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig //define o nome do novo shapefile que será criado $nomefinal = nomeRandomico(); $nomeshp = $this->diretorio."/".$nomefinal; - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); if ($existesel == "nao") {return "errox";} $layerorigem = $this->mapa->getlayerbyname($temaorigem); @@ -1345,7 +1345,7 @@ nome do layer criado com o buffer. $listaShapes = array(); if($this->nome != ""){ //pega os shapes selecionados - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $items = pegaItens($this->layer); @@ -1474,7 +1474,7 @@ $item {string} - (opcional) Item q será utilizado para ponderar os valores. $nomeCentro = nomeRandomico(); $nomeshp = $this->diretorio."/".$nomeCentro; //pega os shapes selecionados - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); if($this->layer->getNumresults() == 0) {$this->layer->querybyrect($this->mapa->extent);} $sopen = $this->layer->open(); @@ -1571,7 +1571,7 @@ $locaplic - Localização do I3geo. $nomeCentroides = nomeRandomico(); $nomeshp = $this->diretorio."/".$nomeCentroides; //pega os shapes selecionados - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $items = pegaItens($this->layer); @@ -2211,7 +2211,7 @@ Salva o mapa acrescentando um novo layer com o resultado. include_once "../pacotes/phpxbase/api_conversion.php"; } //define o nome do novo shapefile que será criado - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $res_count = $this->layer->getNumresults(); @@ -2350,7 +2350,7 @@ $locaplic - Localização do I3geo include_once "../pacotes/phpxbase/api_conversion.php"; } //define o nome do novo shapefile que será criado - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $res_count = $this->layer->getNumresults(); @@ -2524,7 +2524,7 @@ $operacao - Tipo de análise. $calculo = array(); foreach ($lista as $l) { - $geos = &$this->unserializeGeo($dir.$l); + $geos = $this->unserializeGeo($dir.$l); foreach ($geos["dados"] as $geo) { $geometrias[] = $geo["wkt"]; @@ -2594,7 +2594,7 @@ $operacao - Tipo de análise. $dir = $dir_tmp."/".$imgdir."/"; foreach ($lista as $l) { - $geos = &$this->unserializeGeo($dir.$l); + $geos = $this->unserializeGeo($dir.$l); // //verifica a versão do mapserver //se for anterior a 5, utiliza a conexão com o postgis para fazer o processamento dos daods @@ -2661,7 +2661,7 @@ $tipoLista - tipo de valores que são passados em $lista stringArquivos|arraywkt. $valoresoriginais = array(); foreach ($lista as $l) { - $geos = &$this->unserializeGeo($dir.$l); + $geos = $this->unserializeGeo($dir.$l); //pega todas as geometrias foreach ($geos["dados"] as $geo) { @@ -2774,7 +2774,7 @@ function gravaCoordenadasPt($tema,$limitepontos="TRUE",$extendelimite) $nomefinal = nomeRandomico(); $nomearq = $this->diretorio."/".$nomefinal; $itemspt = pegaItens($layerPt); - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); if ($existesel == "nao") { //if($layerPt->getProjection() == "" ) diff --git a/classesphp/classe_atributos.php b/classesphp/classe_atributos.php index 475ba75..e0a5aaf 100644 --- a/classesphp/classe_atributos.php +++ b/classesphp/classe_atributos.php @@ -269,7 +269,7 @@ $tipo - Tipo de busca brasil|null $this->layer->setfilter(""); //le o arquivo de query se existir e checa se existe seleção para o tema $items = pegaItens($this->layer); - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); if ($existesel == "nao") {$this->layer->querybyrect($this->mapa->extent);} $sopen = $this->layer->open(); @@ -338,7 +338,7 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona else {$items[] = $itemtema;} $resultadoFinal[] = array("itens"=>$items); - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $indxlayer = $this->layer->index; $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} @@ -551,7 +551,7 @@ Include: $filtro = $this->layer->getfilterstring(); if ($filtro != ""){$this->layer->setfilter("");} //le o arquivo de query se existir e checa se existe seleção para o tema - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); if ($existesel == "nao") {$this->layer->queryByrect($this->mapa->extent);} $sopen = $this->layer->open(); diff --git a/classesphp/classe_mapa.php b/classesphp/classe_mapa.php index d2a6c45..1eea95e 100644 --- a/classesphp/classe_mapa.php +++ b/classesphp/classe_mapa.php @@ -367,7 +367,7 @@ Include: foreach($this->layers as $l) { $l->set("template","none.htm"); - carregaquery($this->arquivo,&$l,&$this->mapa); + carregaquery2($this->arquivo,$l,$this->mapa); } } $legenda = $this->mapa->legend; @@ -971,7 +971,7 @@ $random - indica se os nomes dos novos layers serão modificados ou nao { $nlayer = $nmap->getlayerbyname($n); if(function_exists("autoClasses")) - autoClasses(&$nlayer,$this->mapa); + autoClasses($nlayer,$this->mapa); // //cria as classes com base em atributos // diff --git a/classesphp/classe_shp.php b/classesphp/classe_shp.php index fa86505..46fa0fc 100644 --- a/classesphp/classe_shp.php +++ b/classesphp/classe_shp.php @@ -388,7 +388,7 @@ array - xy if(!$this->layer){return "erro";} $this->layer->set("template","none.htm"); $this->layer->setfilter(""); - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $res_count = $this->layer->getNumresults(); diff --git a/classesphp/classe_temas.php b/classesphp/classe_temas.php index 6e1527a..bf29039 100644 --- a/classesphp/classe_temas.php +++ b/classesphp/classe_temas.php @@ -780,7 +780,7 @@ $nome - nome que será dado a geometria $ext = $this->mapa->extent; $sb = $this->mapa->scalebar; $sb->set("status",MS_OFF); - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $items = pegaItens($this->layer); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} @@ -1012,7 +1012,7 @@ Calcula a extensão geográfica dos elementos selecionados de um tema e ajusta o m $extatual = $this->mapa->extent; $prjMapa = $this->mapa->getProjection(); $prjTema = $this->layer->getProjection(); - carregaquery($this->arquivo,&$this->layer,&$this->mapa); + carregaquery2($this->arquivo,$this->layer,$this->mapa); $sopen = $this->layer->open(); if($sopen == MS_FAILURE){return "erro";} $res_count = $this->layer->getNumresults(); diff --git a/classesphp/funcoes_gerais.php b/classesphp/funcoes_gerais.php index a956b69..267cd87 100644 --- a/classesphp/funcoes_gerais.php +++ b/classesphp/funcoes_gerais.php @@ -1894,7 +1894,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) $reg = array(); $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); //le o arquivo de query se existir e checa se existe seleção para o tema - $existesel = carregaquery($map_file,&$layer,&$map); + $existesel = carregaquery2($map_file,$layer,$map); if ($existesel == "nao") {@$layer->queryByrect($map->extent);} //pega cada registro @@ -2735,7 +2735,11 @@ function removeLinha($texto,$mapfile) foreach($novoarray as $linha) {$escreve = fwrite ($abre,$linha);} $fecha = fclose ($abre); -} +} +// +//depreciado para incluir &$ para compatibilizar com PHP 5.x +//utilize carregaquery2 +// function carregaquery($mapfile,$objlayer,$objmapa) { $qyfile = dirname($mapfile)."/".$objlayer->name.".php"; @@ -2752,6 +2756,22 @@ function carregaquery($mapfile,$objlayer,$objmapa) } return "nao"; } +function carregaquery2($mapfile,&$objlayer,&$objmapa) +{ + $qyfile = dirname($mapfile)."/".$objlayer->name.".php"; + if(file_exists($qyfile)) + { + $indxlayer = $objlayer->index; + $handle = fopen ($qyfile, "r"); + $conteudo = fread ($handle, filesize ($qyfile)); + fclose ($handle); + $shp = unserialize($conteudo); + foreach ($shp as $indx) + {$objmapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} + return "sim"; + } + return "nao"; +} /* Function: verificaEditores diff --git a/classesphp/graficos.php b/classesphp/graficos.php index 52e98f3..d87c8be 100644 --- a/classesphp/graficos.php +++ b/classesphp/graficos.php @@ -387,7 +387,7 @@ function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$t $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); } $layer = $map->getLayerByName($tema); - $selecionados = carregaquery($map_file,&$layer,&$map); + $selecionados = carregaquery2($map_file,$layer,$map); if ($exclui == ""){$exclui = "nulo";} $valores = pegaValoresM($map,$layer,array($itemclasses,$itemvalores),$exclui,$selecionados); $dados = agrupaValores($valores,0,1,$tipo); @@ -433,7 +433,7 @@ function dadosLinhaDoTempo($map_file,$tema,$ext="") $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); } $layer = $map->getLayerByName($tema); - $selecionados = carregaquery($map_file,&$layer,&$map); + $selecionados = carregaquery2($map_file,$layer,$map); if ($exclui == ""){$exclui = "nulo";} //define os itens para pegar os dados $itens = array(); diff --git a/classesphp/mapa_googleearth.php b/classesphp/mapa_googleearth.php index 23d29c5..dfca227 100644 --- a/classesphp/mapa_googleearth.php +++ b/classesphp/mapa_googleearth.php @@ -140,8 +140,9 @@ function retornaWms($map_fileX,$postgis_mapa){ $l = $mapa->getLayerByname($layerName); if ($l->getmetadata("classesnome") != "") { - include_once("funcoes_gerais.php"); - autoClasses(&$l,$mapa); + if(!function_exists("autoClasses")) + {include_once("funcoes_gerais.php");} + autoClasses($l,$mapa); } if($layerName != $_GET["layer"]) {$l->set("status",MS_OFF);} diff --git a/classesphp/mapa_googlemaps.php b/classesphp/mapa_googlemaps.php index 48c9efe..250734a 100644 --- a/classesphp/mapa_googlemaps.php +++ b/classesphp/mapa_googlemaps.php @@ -150,8 +150,9 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alter $l = $mapa->getLayerByname($layerName); if ($l->getmetadata("classesnome") != "") { - include_once("funcoes_gerais.php"); - autoClasses(&$l,$mapa); + if(!function_exists("autoClasses")) + {include_once("funcoes_gerais.php");} + autoClasses($l,$mapa); } if($layerName != $_GET["layer"]) {$l->set("status",MS_OFF);} @@ -251,9 +252,9 @@ if (!function_exists('imagepng')) } if(trim($_GET["TIPOIMAGEM"]) != "" && trim($_GET["TIPOIMAGEM"]) != "nenhum") { - $nomer = ($img->imagepath)."filtroimgtemp".nomeRandomico().".png"; + $nomer = ($img->imagepath)."filtroimgtemp".nomeRand().".png"; $img->saveImage($nomer); - filtraImagem($nomer,trim($_GET["TIPOIMAGEM"])); + filtraImg($nomer,trim($_GET["TIPOIMAGEM"])); $img = imagecreatefrompng($nomer); imagealphablending($img, false); imagesavealpha($img, true); @@ -265,7 +266,7 @@ else{ if($cache == true) {$nomer = salvaCacheImagem($_GET["BBOX"],$nomecache,$map_fileX,$_GET["WIDTH"],$_GET["HEIGHT"]);} else{ - $nomer = ($img->imagepath)."imgtemp".nomeRandomico().".png"; + $nomer = ($img->imagepath)."imgtemp".nomeRand().".png"; $img->saveImage($nomer); } ob_clean(); @@ -332,7 +333,7 @@ function carregaCacheImagem($bbox,$layer,$map,$w,$h){ exit; } } -function nomeRandomico($n=10) +function nomeRand($n=10) { $nomes = ""; $a = 'azertyuiopqsdfghjklmwxcvbnABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -341,7 +342,7 @@ function nomeRandomico($n=10) {$nomes .= $a{mt_rand(0, $max)};} return $nomes; } -function filtraImagem($nomer,$tipoimagem){ +function filtraImg($nomer,$tipoimagem){ include_once("classe_imagem.php"); $tiposImagem = explode(" ",$tipoimagem); foreach ($tiposImagem as $tipoimagem){ diff --git a/classesphp/mapa_openlayers.php b/classesphp/mapa_openlayers.php index b1174ab..ccc0115 100644 --- a/classesphp/mapa_openlayers.php +++ b/classesphp/mapa_openlayers.php @@ -123,8 +123,9 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao e alter $layerName = $l->name; if ($l->getmetadata("classesnome") != "") { - include_once("funcoes_gerais.php"); - autoClasses(&$l,$mapa); + if(!function_exists("autoClasses")) + {include_once("funcoes_gerais.php");} + autoClasses($l,$mapa); } if($layerName != $_GET["layer"]) {$l->set("status",MS_OFF);} @@ -242,9 +243,9 @@ if (!function_exists('imagepng')) } if(trim($_GET["TIPOIMAGEM"]) != "" && trim($_GET["TIPOIMAGEM"]) != "nenhum") { - $nomer = ($img->imagepath)."filtroimgtemp".nomeRandomico().".png"; + $nomer = ($img->imagepath)."filtroimgtemp".nomeRand().".png"; $img->saveImage($nomer); - filtraImagem($nomer,$_GET["TIPOIMAGEM"]); + filtraImg($nomer,$_GET["TIPOIMAGEM"]); $img = imagecreatefrompng($nomer); imagealphablending($img, false); imagesavealpha($img, true); @@ -257,7 +258,7 @@ else{ if($cache == true) {$nomer = salvaCacheImagem($_GET["BBOX"],$nomecache,$map_fileX,$_GET["WIDTH"],$_GET["HEIGHT"]);} else{ - $nomer = ($img->imagepath)."imgtemp".nomeRandomico().".png"; + $nomer = ($img->imagepath)."imgtemp".nomeRand().".png"; $img->saveImage($nomer); } ob_clean(); @@ -332,7 +333,7 @@ function carregaCacheImagem($bbox,$layer,$map,$w,$h){ exit; } } -function nomeRandomico($n=10) +function nomeRand($n=10) { $nomes = ""; $a = 'azertyuiopqsdfghjklmwxcvbnABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -341,7 +342,7 @@ function nomeRandomico($n=10) {$nomes .= $a{mt_rand(0, $max)};} return $nomes; } -function filtraImagem($nomer,$tipoimagem){ +function filtraImg($nomer,$tipoimagem){ include_once("classe_imagem.php"); $tiposImagem = explode(" ",$tipoimagem); foreach ($tiposImagem as $tipoimagem){ diff --git a/classesphp/parse_cgi.php b/classesphp/parse_cgi.php index 9af1d87..d3c8f97 100644 --- a/classesphp/parse_cgi.php +++ b/classesphp/parse_cgi.php @@ -85,7 +85,7 @@ foreach ($layersNames as $layerName) { $layer = $map->getLayerByname($layerName); if ($layer->getmetadata("classesnome") != "") - {autoClasses(&$layer,$map);} + {autoClasses($layer,$map);} if($layer->type == MS_LAYER_POLYGON) { $nclasses = $layer->numclasses; diff --git a/ferramentas/tabela/relatorio.php b/ferramentas/tabela/relatorio.php index 93ffa53..cc52e45 100644 --- a/ferramentas/tabela/relatorio.php +++ b/ferramentas/tabela/relatorio.php @@ -12,7 +12,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; include("../../classesphp/carrega_ext.php"); include("../../classesphp/funcoes_gerais.php"); $versao = versao(); -$versao = versao["principal"]; +$versao = $versao["principal"]; substituiCon($map_file,$postgis_mapa); $temp = explode(",",$nomesrel); $colunas = array(); @@ -32,14 +32,12 @@ foreach($temp as $t) } if($itemagruparel != "" && !in_array($itemagruparel,$itensrel)) {$itensrel[] = $itemagruparel;} - $mapa = ms_newMapObj($map_file); if($ext && $ext != ""){ $e = explode(" ",$ext); $extatual = $mapa->extent; $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); } - $layer = $mapa->getlayerbyname($temarel); $layer->set("template","none.html"); $existesel = "nao"; @@ -47,7 +45,7 @@ $existesel = "nao"; if (file_exists($map_file."qy")) {$mapa->loadquery($map_file."qy");} */ -carregaquery($map_file,&$layer,&$mapa); +carregaquery2($map_file,$layer,$mapa); if ($layer->getNumresults() > 0){$existesel = "sim";} if ($existesel == "nao") {$layer->querybyrect($mapa->extent);} diff --git a/geraminiatura.php b/geraminiatura.php index 45856df..3bc42ac 100644 --- a/geraminiatura.php +++ b/geraminiatura.php @@ -132,7 +132,7 @@ function verificaMiniatura($map,$tipo,$admin=false) $layern = $nmapa->getLayerByName($teman); $layern->set("status",MS_DEFAULT); ms_newLayerObj($mapa, $layern); - autoClasses(&$layern,$mapa,$locaplic); + autoClasses($layern,$mapa,$locaplic); if ($layern->data == "") $dados = $layern->connection; else @@ -157,7 +157,7 @@ function verificaMiniatura($map,$tipo,$admin=false) } } } - zoomTemaMiniatura($pegarext,&$mapa); + zoomTemaMiniatura($pegarext,$mapa); if ($tipo == "mini" || $tipo == "todos") { $mapa->setsize(50,50); diff --git a/ms_criamapa.php b/ms_criamapa.php index 5a105b9..2c7789d 100644 --- a/ms_criamapa.php +++ b/ms_criamapa.php @@ -612,7 +612,7 @@ function incluiTemasIniciais() if ($layern->name == "estadosl") {$layern->set("data",$locaplic."/aplicmap/dados/estados.shp");} $layern->setmetadata("NOMEORIGINAL",$layern->name); - autoClasses(&$layern,$mapn); + autoClasses($layern,$mapn); // //necessário para não alterar a extensão do mapa por esse parâmetro // @@ -634,7 +634,7 @@ function incluiTemasIniciais() $layern->set("type",$tipotemp); $layern->set("status",statustemp); } - ms_newLayerObj(&$mapn, $layern); + ms_newLayerObj($mapn, $layern); } } } @@ -644,7 +644,7 @@ function incluiTemasIniciais() // if($existeraster) { - $of = &$mapn->outputformat; + $of = $mapn->outputformat; $of->set("imagemode",MS_IMAGEMODE_RGB); } erroCriacao(); @@ -1059,7 +1059,7 @@ function incluiMapaGvsig($gvsiggvp,$gvsigview){ include_once($locaplic."/pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php"); $gm = new gvsig2mapfile($gvsiggvp); $dataView = $gm->getViewData($gvsigview); - //var_dump($dataView); + //var_dump($dataView);exit; $lnames = $mapn->getalllayernames(); foreach($lnames as $name){ $layer = $mapn->getlayerbyname($name); diff --git a/ogc.php b/ogc.php index 72ba18c..3e27f42 100644 --- a/ogc.php +++ b/ogc.php @@ -231,7 +231,7 @@ if ($tipo == "" || $tipo == "metadados") } } } - autoClasses(&$l,$oMap); + autoClasses($l,$oMap); $permite = $l->getmetadata("permiteogc"); if($permite != "nao") ms_newLayerObj($oMap, $l); diff --git a/testamapfile.php b/testamapfile.php index c7c54b4..6019528 100644 --- a/testamapfile.php +++ b/testamapfile.php @@ -197,7 +197,7 @@ function verifica($map,$solegenda) } } - autoClasses(&$layern,$nmapa); + autoClasses($layern,$nmapa); if($layern->classitem != "" && $layern->connectiontype == 7 && $layern->numclasses > 0 && $layern->getmetadata("wms_sld_body") == ""){ $tipotemp = $layern->type; $tiporep = $layern->getmetadata("tipooriginal"); @@ -219,7 +219,7 @@ function verifica($map,$solegenda) $dados = $layern->data; $pegarext = $teman; } - zoomTema($pegarext,&$mapa); + zoomTema($pegarext,$mapa); if ($tipo == "mini") { $mapa->setsize(50,50); -- libgit2 0.21.2