Commit fae8e9690e09f27fc6225d4f0204ef8bac8e6387
1 parent
d1cd233c
Exists in
master
and in
7 other branches
Remoção da passagem de valor por referência na chamada de funções (operação depreciada no PHP)
Showing
19 changed files
with
80 additions
and
57 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/php/parsemapfile.php
... | ... | @@ -396,7 +396,7 @@ function mapfile() |
396 | 396 | $xml .= "<sizeunits>$layer->sizeunits</sizeunits>\n"; |
397 | 397 | $xml .= "<projection>$layer->getProjection</projection>\n"; |
398 | 398 | $xml .= "<classes>\n"; |
399 | - $xml .= pegaClasses(&$xml); | |
399 | + $xml = pegaClasses($xml); | |
400 | 400 | $xml .= "</classes>\n"; |
401 | 401 | } |
402 | 402 | $xml .= "</layer>"; |
... | ... | @@ -421,12 +421,13 @@ function pegaClasses($xml) |
421 | 421 | $xml .= "<symbolname>$classe->symbolname</symbolname>\n"; |
422 | 422 | $xml .= "<type>$classe->type</type>\n"; |
423 | 423 | $xml .= "<estilos>\n"; |
424 | - pegaEstilos($xml,$classe); | |
424 | + $xml = pegaEstilos($xml,$classe); | |
425 | 425 | $xml .= "</estilos>\n"; |
426 | 426 | $xml .= "</classe>\n"; |
427 | 427 | } |
428 | + return $xml; | |
428 | 429 | } |
429 | -function pegaEstilos(&$xml,$classe) | |
430 | +function pegaEstilos($xml,$classe) | |
430 | 431 | { |
431 | 432 | $numestilos = $classe->numstyles; |
432 | 433 | $estilos = array(); |
... | ... | @@ -441,6 +442,7 @@ function pegaEstilos(&$xml,$classe) |
441 | 442 | $xml .= "<outlinecolor>".$estilo->outlinecolor->red.",".$estilo->outlinecolor->green.",".$estilo->outlinecolor->blue."</outlinecolor>\n"; |
442 | 443 | $xml .= "</estilo>\n"; |
443 | 444 | } |
445 | + return $xml; | |
444 | 446 | } |
445 | 447 | |
446 | 448 | ?> |
447 | 449 | \ No newline at end of file | ... | ... |
admin/php/xml.php
... | ... | @@ -94,7 +94,7 @@ function geraXmlSistemas($perfil,$locaplic,$editores) |
94 | 94 | $xml .= " <PERFIL>".$row["perfil_sistema"]."</PERFIL>\n"; |
95 | 95 | $xml .= " <PUBLICADO>".$row["publicado_sistema"]."</PUBLICADO>\n"; |
96 | 96 | $xml .= " <NOMESIS>".xmlTexto_prepara($row["nome_sistema"])."</NOMESIS>\n"; |
97 | - geraXmlSistemas_pegafuncoes($perfil,&$xml,$row["id_sistema"],$dbh); | |
97 | + geraXmlSistemas_pegafuncoes($perfil,$xml,$row["id_sistema"],$dbh); | |
98 | 98 | $xml .= "</SISTEMA>\n"; |
99 | 99 | } |
100 | 100 | } | ... | ... |
classesphp/classe_analise.php
... | ... | @@ -1023,7 +1023,7 @@ $locaplic - Localização do I3geo. |
1023 | 1023 | $nomeshp = $this->diretorio."/".$nomefinal; |
1024 | 1024 | //pega os shapes selecionados |
1025 | 1025 | $itemspt = pegaItens($layerPt); |
1026 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1026 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1027 | 1027 | if ($existesel == "nao") |
1028 | 1028 | {$layerPt->queryByrect($this->mapa->extent);} |
1029 | 1029 | $res_count = $layerPt->getNumresults(); |
... | ... | @@ -1194,7 +1194,7 @@ function distanciaptpt($temaorigem,$temadestino,$temaoverlay,$locaplic,$itemorig |
1194 | 1194 | //define o nome do novo shapefile que será criado |
1195 | 1195 | $nomefinal = nomeRandomico(); |
1196 | 1196 | $nomeshp = $this->diretorio."/".$nomefinal; |
1197 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1197 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1198 | 1198 | if ($existesel == "nao") |
1199 | 1199 | {return "errox";} |
1200 | 1200 | $layerorigem = $this->mapa->getlayerbyname($temaorigem); |
... | ... | @@ -1345,7 +1345,7 @@ nome do layer criado com o buffer. |
1345 | 1345 | $listaShapes = array(); |
1346 | 1346 | if($this->nome != ""){ |
1347 | 1347 | //pega os shapes selecionados |
1348 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1348 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1349 | 1349 | $sopen = $this->layer->open(); |
1350 | 1350 | if($sopen == MS_FAILURE){return "erro";} |
1351 | 1351 | $items = pegaItens($this->layer); |
... | ... | @@ -1474,7 +1474,7 @@ $item {string} - (opcional) Item q será utilizado para ponderar os valores. |
1474 | 1474 | $nomeCentro = nomeRandomico(); |
1475 | 1475 | $nomeshp = $this->diretorio."/".$nomeCentro; |
1476 | 1476 | //pega os shapes selecionados |
1477 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1477 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1478 | 1478 | if($this->layer->getNumresults() == 0) |
1479 | 1479 | {$this->layer->querybyrect($this->mapa->extent);} |
1480 | 1480 | $sopen = $this->layer->open(); |
... | ... | @@ -1571,7 +1571,7 @@ $locaplic - Localização do I3geo. |
1571 | 1571 | $nomeCentroides = nomeRandomico(); |
1572 | 1572 | $nomeshp = $this->diretorio."/".$nomeCentroides; |
1573 | 1573 | //pega os shapes selecionados |
1574 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1574 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1575 | 1575 | $sopen = $this->layer->open(); |
1576 | 1576 | if($sopen == MS_FAILURE){return "erro";} |
1577 | 1577 | $items = pegaItens($this->layer); |
... | ... | @@ -2211,7 +2211,7 @@ Salva o mapa acrescentando um novo layer com o resultado. |
2211 | 2211 | include_once "../pacotes/phpxbase/api_conversion.php"; |
2212 | 2212 | } |
2213 | 2213 | //define o nome do novo shapefile que será criado |
2214 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
2214 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
2215 | 2215 | $sopen = $this->layer->open(); |
2216 | 2216 | if($sopen == MS_FAILURE){return "erro";} |
2217 | 2217 | $res_count = $this->layer->getNumresults(); |
... | ... | @@ -2350,7 +2350,7 @@ $locaplic - Localização do I3geo |
2350 | 2350 | include_once "../pacotes/phpxbase/api_conversion.php"; |
2351 | 2351 | } |
2352 | 2352 | //define o nome do novo shapefile que será criado |
2353 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
2353 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
2354 | 2354 | $sopen = $this->layer->open(); |
2355 | 2355 | if($sopen == MS_FAILURE){return "erro";} |
2356 | 2356 | $res_count = $this->layer->getNumresults(); |
... | ... | @@ -2524,7 +2524,7 @@ $operacao - Tipo de análise. |
2524 | 2524 | $calculo = array(); |
2525 | 2525 | foreach ($lista as $l) |
2526 | 2526 | { |
2527 | - $geos = &$this->unserializeGeo($dir.$l); | |
2527 | + $geos = $this->unserializeGeo($dir.$l); | |
2528 | 2528 | foreach ($geos["dados"] as $geo) |
2529 | 2529 | { |
2530 | 2530 | $geometrias[] = $geo["wkt"]; |
... | ... | @@ -2594,7 +2594,7 @@ $operacao - Tipo de análise. |
2594 | 2594 | $dir = $dir_tmp."/".$imgdir."/"; |
2595 | 2595 | foreach ($lista as $l) |
2596 | 2596 | { |
2597 | - $geos = &$this->unserializeGeo($dir.$l); | |
2597 | + $geos = $this->unserializeGeo($dir.$l); | |
2598 | 2598 | // |
2599 | 2599 | //verifica a versão do mapserver |
2600 | 2600 | //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. |
2661 | 2661 | $valoresoriginais = array(); |
2662 | 2662 | foreach ($lista as $l) |
2663 | 2663 | { |
2664 | - $geos = &$this->unserializeGeo($dir.$l); | |
2664 | + $geos = $this->unserializeGeo($dir.$l); | |
2665 | 2665 | //pega todas as geometrias |
2666 | 2666 | foreach ($geos["dados"] as $geo) |
2667 | 2667 | { |
... | ... | @@ -2774,7 +2774,7 @@ function gravaCoordenadasPt($tema,$limitepontos="TRUE",$extendelimite) |
2774 | 2774 | $nomefinal = nomeRandomico(); |
2775 | 2775 | $nomearq = $this->diretorio."/".$nomefinal; |
2776 | 2776 | $itemspt = pegaItens($layerPt); |
2777 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
2777 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
2778 | 2778 | if ($existesel == "nao") |
2779 | 2779 | { |
2780 | 2780 | //if($layerPt->getProjection() == "" ) | ... | ... |
classesphp/classe_atributos.php
... | ... | @@ -269,7 +269,7 @@ $tipo - Tipo de busca brasil|null |
269 | 269 | $this->layer->setfilter(""); |
270 | 270 | //le o arquivo de query se existir e checa se existe seleção para o tema |
271 | 271 | $items = pegaItens($this->layer); |
272 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
272 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
273 | 273 | if ($existesel == "nao") |
274 | 274 | {$this->layer->querybyrect($this->mapa->extent);} |
275 | 275 | $sopen = $this->layer->open(); |
... | ... | @@ -338,7 +338,7 @@ $tipolista - Indica se serão mostrados todos os registros ou apenas os seleciona |
338 | 338 | else |
339 | 339 | {$items[] = $itemtema;} |
340 | 340 | $resultadoFinal[] = array("itens"=>$items); |
341 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
341 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
342 | 342 | $indxlayer = $this->layer->index; |
343 | 343 | $sopen = $this->layer->open(); |
344 | 344 | if($sopen == MS_FAILURE){return "erro";} |
... | ... | @@ -551,7 +551,7 @@ Include: |
551 | 551 | $filtro = $this->layer->getfilterstring(); |
552 | 552 | if ($filtro != ""){$this->layer->setfilter("");} |
553 | 553 | //le o arquivo de query se existir e checa se existe seleção para o tema |
554 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
554 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
555 | 555 | if ($existesel == "nao") |
556 | 556 | {$this->layer->queryByrect($this->mapa->extent);} |
557 | 557 | $sopen = $this->layer->open(); | ... | ... |
classesphp/classe_mapa.php
... | ... | @@ -367,7 +367,7 @@ Include: |
367 | 367 | foreach($this->layers as $l) |
368 | 368 | { |
369 | 369 | $l->set("template","none.htm"); |
370 | - carregaquery($this->arquivo,&$l,&$this->mapa); | |
370 | + carregaquery2($this->arquivo,$l,$this->mapa); | |
371 | 371 | } |
372 | 372 | } |
373 | 373 | $legenda = $this->mapa->legend; |
... | ... | @@ -971,7 +971,7 @@ $random - indica se os nomes dos novos layers serão modificados ou nao |
971 | 971 | { |
972 | 972 | $nlayer = $nmap->getlayerbyname($n); |
973 | 973 | if(function_exists("autoClasses")) |
974 | - autoClasses(&$nlayer,$this->mapa); | |
974 | + autoClasses($nlayer,$this->mapa); | |
975 | 975 | // |
976 | 976 | //cria as classes com base em atributos |
977 | 977 | // | ... | ... |
classesphp/classe_shp.php
... | ... | @@ -388,7 +388,7 @@ array - xy |
388 | 388 | if(!$this->layer){return "erro";} |
389 | 389 | $this->layer->set("template","none.htm"); |
390 | 390 | $this->layer->setfilter(""); |
391 | - $existesel = carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
391 | + $existesel = carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
392 | 392 | $sopen = $this->layer->open(); |
393 | 393 | if($sopen == MS_FAILURE){return "erro";} |
394 | 394 | $res_count = $this->layer->getNumresults(); | ... | ... |
classesphp/classe_temas.php
... | ... | @@ -780,7 +780,7 @@ $nome - nome que será dado a geometria |
780 | 780 | $ext = $this->mapa->extent; |
781 | 781 | $sb = $this->mapa->scalebar; |
782 | 782 | $sb->set("status",MS_OFF); |
783 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
783 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
784 | 784 | $items = pegaItens($this->layer); |
785 | 785 | $sopen = $this->layer->open(); |
786 | 786 | 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 |
1012 | 1012 | $extatual = $this->mapa->extent; |
1013 | 1013 | $prjMapa = $this->mapa->getProjection(); |
1014 | 1014 | $prjTema = $this->layer->getProjection(); |
1015 | - carregaquery($this->arquivo,&$this->layer,&$this->mapa); | |
1015 | + carregaquery2($this->arquivo,$this->layer,$this->mapa); | |
1016 | 1016 | $sopen = $this->layer->open(); |
1017 | 1017 | if($sopen == MS_FAILURE){return "erro";} |
1018 | 1018 | $res_count = $this->layer->getNumresults(); | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -1894,7 +1894,7 @@ function criaSHP($tema,$map_file,$locaplic,$dir_tmp,$nomeRand=TRUE) |
1894 | 1894 | $reg = array(); |
1895 | 1895 | $novoshpf = ms_newShapefileObj($nomeshp.".shp", -2); |
1896 | 1896 | //le o arquivo de query se existir e checa se existe seleção para o tema |
1897 | - $existesel = carregaquery($map_file,&$layer,&$map); | |
1897 | + $existesel = carregaquery2($map_file,$layer,$map); | |
1898 | 1898 | if ($existesel == "nao") |
1899 | 1899 | {@$layer->queryByrect($map->extent);} |
1900 | 1900 | //pega cada registro |
... | ... | @@ -2735,7 +2735,11 @@ function removeLinha($texto,$mapfile) |
2735 | 2735 | foreach($novoarray as $linha) |
2736 | 2736 | {$escreve = fwrite ($abre,$linha);} |
2737 | 2737 | $fecha = fclose ($abre); |
2738 | -} | |
2738 | +} | |
2739 | +// | |
2740 | +//depreciado para incluir &$ para compatibilizar com PHP 5.x | |
2741 | +//utilize carregaquery2 | |
2742 | +// | |
2739 | 2743 | function carregaquery($mapfile,$objlayer,$objmapa) |
2740 | 2744 | { |
2741 | 2745 | $qyfile = dirname($mapfile)."/".$objlayer->name.".php"; |
... | ... | @@ -2752,6 +2756,22 @@ function carregaquery($mapfile,$objlayer,$objmapa) |
2752 | 2756 | } |
2753 | 2757 | return "nao"; |
2754 | 2758 | } |
2759 | +function carregaquery2($mapfile,&$objlayer,&$objmapa) | |
2760 | +{ | |
2761 | + $qyfile = dirname($mapfile)."/".$objlayer->name.".php"; | |
2762 | + if(file_exists($qyfile)) | |
2763 | + { | |
2764 | + $indxlayer = $objlayer->index; | |
2765 | + $handle = fopen ($qyfile, "r"); | |
2766 | + $conteudo = fread ($handle, filesize ($qyfile)); | |
2767 | + fclose ($handle); | |
2768 | + $shp = unserialize($conteudo); | |
2769 | + foreach ($shp as $indx) | |
2770 | + {$objmapa->querybyindex($indxlayer,-1,$indx,MS_TRUE);} | |
2771 | + return "sim"; | |
2772 | + } | |
2773 | + return "nao"; | |
2774 | +} | |
2755 | 2775 | /* |
2756 | 2776 | Function: verificaEditores |
2757 | 2777 | ... | ... |
classesphp/graficos.php
... | ... | @@ -387,7 +387,7 @@ function iniciaDadosGrafico($map_file,$tema,$exclui,$itemclasses,$itemvalores,$t |
387 | 387 | $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); |
388 | 388 | } |
389 | 389 | $layer = $map->getLayerByName($tema); |
390 | - $selecionados = carregaquery($map_file,&$layer,&$map); | |
390 | + $selecionados = carregaquery2($map_file,$layer,$map); | |
391 | 391 | if ($exclui == ""){$exclui = "nulo";} |
392 | 392 | $valores = pegaValoresM($map,$layer,array($itemclasses,$itemvalores),$exclui,$selecionados); |
393 | 393 | $dados = agrupaValores($valores,0,1,$tipo); |
... | ... | @@ -433,7 +433,7 @@ function dadosLinhaDoTempo($map_file,$tema,$ext="") |
433 | 433 | $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); |
434 | 434 | } |
435 | 435 | $layer = $map->getLayerByName($tema); |
436 | - $selecionados = carregaquery($map_file,&$layer,&$map); | |
436 | + $selecionados = carregaquery2($map_file,$layer,$map); | |
437 | 437 | if ($exclui == ""){$exclui = "nulo";} |
438 | 438 | //define os itens para pegar os dados |
439 | 439 | $itens = array(); | ... | ... |
classesphp/mapa_googleearth.php
... | ... | @@ -140,8 +140,9 @@ function retornaWms($map_fileX,$postgis_mapa){ |
140 | 140 | $l = $mapa->getLayerByname($layerName); |
141 | 141 | if ($l->getmetadata("classesnome") != "") |
142 | 142 | { |
143 | - include_once("funcoes_gerais.php"); | |
144 | - autoClasses(&$l,$mapa); | |
143 | + if(!function_exists("autoClasses")) | |
144 | + {include_once("funcoes_gerais.php");} | |
145 | + autoClasses($l,$mapa); | |
145 | 146 | } |
146 | 147 | if($layerName != $_GET["layer"]) |
147 | 148 | {$l->set("status",MS_OFF);} | ... | ... |
classesphp/mapa_googlemaps.php
... | ... | @@ -150,8 +150,9 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alter |
150 | 150 | $l = $mapa->getLayerByname($layerName); |
151 | 151 | if ($l->getmetadata("classesnome") != "") |
152 | 152 | { |
153 | - include_once("funcoes_gerais.php"); | |
154 | - autoClasses(&$l,$mapa); | |
153 | + if(!function_exists("autoClasses")) | |
154 | + {include_once("funcoes_gerais.php");} | |
155 | + autoClasses($l,$mapa); | |
155 | 156 | } |
156 | 157 | if($layerName != $_GET["layer"]) |
157 | 158 | {$l->set("status",MS_OFF);} |
... | ... | @@ -251,9 +252,9 @@ if (!function_exists('imagepng')) |
251 | 252 | } |
252 | 253 | if(trim($_GET["TIPOIMAGEM"]) != "" && trim($_GET["TIPOIMAGEM"]) != "nenhum") |
253 | 254 | { |
254 | - $nomer = ($img->imagepath)."filtroimgtemp".nomeRandomico().".png"; | |
255 | + $nomer = ($img->imagepath)."filtroimgtemp".nomeRand().".png"; | |
255 | 256 | $img->saveImage($nomer); |
256 | - filtraImagem($nomer,trim($_GET["TIPOIMAGEM"])); | |
257 | + filtraImg($nomer,trim($_GET["TIPOIMAGEM"])); | |
257 | 258 | $img = imagecreatefrompng($nomer); |
258 | 259 | imagealphablending($img, false); |
259 | 260 | imagesavealpha($img, true); |
... | ... | @@ -265,7 +266,7 @@ else{ |
265 | 266 | if($cache == true) |
266 | 267 | {$nomer = salvaCacheImagem($_GET["BBOX"],$nomecache,$map_fileX,$_GET["WIDTH"],$_GET["HEIGHT"]);} |
267 | 268 | else{ |
268 | - $nomer = ($img->imagepath)."imgtemp".nomeRandomico().".png"; | |
269 | + $nomer = ($img->imagepath)."imgtemp".nomeRand().".png"; | |
269 | 270 | $img->saveImage($nomer); |
270 | 271 | } |
271 | 272 | ob_clean(); |
... | ... | @@ -332,7 +333,7 @@ function carregaCacheImagem($bbox,$layer,$map,$w,$h){ |
332 | 333 | exit; |
333 | 334 | } |
334 | 335 | } |
335 | -function nomeRandomico($n=10) | |
336 | +function nomeRand($n=10) | |
336 | 337 | { |
337 | 338 | $nomes = ""; |
338 | 339 | $a = 'azertyuiopqsdfghjklmwxcvbnABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
... | ... | @@ -341,7 +342,7 @@ function nomeRandomico($n=10) |
341 | 342 | {$nomes .= $a{mt_rand(0, $max)};} |
342 | 343 | return $nomes; |
343 | 344 | } |
344 | -function filtraImagem($nomer,$tipoimagem){ | |
345 | +function filtraImg($nomer,$tipoimagem){ | |
345 | 346 | include_once("classe_imagem.php"); |
346 | 347 | $tiposImagem = explode(" ",$tipoimagem); |
347 | 348 | foreach ($tiposImagem as $tipoimagem){ | ... | ... |
classesphp/mapa_openlayers.php
... | ... | @@ -123,8 +123,9 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao e alter |
123 | 123 | $layerName = $l->name; |
124 | 124 | if ($l->getmetadata("classesnome") != "") |
125 | 125 | { |
126 | - include_once("funcoes_gerais.php"); | |
127 | - autoClasses(&$l,$mapa); | |
126 | + if(!function_exists("autoClasses")) | |
127 | + {include_once("funcoes_gerais.php");} | |
128 | + autoClasses($l,$mapa); | |
128 | 129 | } |
129 | 130 | if($layerName != $_GET["layer"]) |
130 | 131 | {$l->set("status",MS_OFF);} |
... | ... | @@ -242,9 +243,9 @@ if (!function_exists('imagepng')) |
242 | 243 | } |
243 | 244 | if(trim($_GET["TIPOIMAGEM"]) != "" && trim($_GET["TIPOIMAGEM"]) != "nenhum") |
244 | 245 | { |
245 | - $nomer = ($img->imagepath)."filtroimgtemp".nomeRandomico().".png"; | |
246 | + $nomer = ($img->imagepath)."filtroimgtemp".nomeRand().".png"; | |
246 | 247 | $img->saveImage($nomer); |
247 | - filtraImagem($nomer,$_GET["TIPOIMAGEM"]); | |
248 | + filtraImg($nomer,$_GET["TIPOIMAGEM"]); | |
248 | 249 | $img = imagecreatefrompng($nomer); |
249 | 250 | imagealphablending($img, false); |
250 | 251 | imagesavealpha($img, true); |
... | ... | @@ -257,7 +258,7 @@ else{ |
257 | 258 | if($cache == true) |
258 | 259 | {$nomer = salvaCacheImagem($_GET["BBOX"],$nomecache,$map_fileX,$_GET["WIDTH"],$_GET["HEIGHT"]);} |
259 | 260 | else{ |
260 | - $nomer = ($img->imagepath)."imgtemp".nomeRandomico().".png"; | |
261 | + $nomer = ($img->imagepath)."imgtemp".nomeRand().".png"; | |
261 | 262 | $img->saveImage($nomer); |
262 | 263 | } |
263 | 264 | ob_clean(); |
... | ... | @@ -332,7 +333,7 @@ function carregaCacheImagem($bbox,$layer,$map,$w,$h){ |
332 | 333 | exit; |
333 | 334 | } |
334 | 335 | } |
335 | -function nomeRandomico($n=10) | |
336 | +function nomeRand($n=10) | |
336 | 337 | { |
337 | 338 | $nomes = ""; |
338 | 339 | $a = 'azertyuiopqsdfghjklmwxcvbnABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
... | ... | @@ -341,7 +342,7 @@ function nomeRandomico($n=10) |
341 | 342 | {$nomes .= $a{mt_rand(0, $max)};} |
342 | 343 | return $nomes; |
343 | 344 | } |
344 | -function filtraImagem($nomer,$tipoimagem){ | |
345 | +function filtraImg($nomer,$tipoimagem){ | |
345 | 346 | include_once("classe_imagem.php"); |
346 | 347 | $tiposImagem = explode(" ",$tipoimagem); |
347 | 348 | foreach ($tiposImagem as $tipoimagem){ | ... | ... |
classesphp/parse_cgi.php
... | ... | @@ -85,7 +85,7 @@ foreach ($layersNames as $layerName) |
85 | 85 | { |
86 | 86 | $layer = $map->getLayerByname($layerName); |
87 | 87 | if ($layer->getmetadata("classesnome") != "") |
88 | - {autoClasses(&$layer,$map);} | |
88 | + {autoClasses($layer,$map);} | |
89 | 89 | if($layer->type == MS_LAYER_POLYGON) |
90 | 90 | { |
91 | 91 | $nclasses = $layer->numclasses; | ... | ... |
ferramentas/tabela/relatorio.php
... | ... | @@ -12,7 +12,7 @@ $postgis_mapa = $_SESSION["postgis_mapa"]; |
12 | 12 | include("../../classesphp/carrega_ext.php"); |
13 | 13 | include("../../classesphp/funcoes_gerais.php"); |
14 | 14 | $versao = versao(); |
15 | -$versao = versao["principal"]; | |
15 | +$versao = $versao["principal"]; | |
16 | 16 | substituiCon($map_file,$postgis_mapa); |
17 | 17 | $temp = explode(",",$nomesrel); |
18 | 18 | $colunas = array(); |
... | ... | @@ -32,14 +32,12 @@ foreach($temp as $t) |
32 | 32 | } |
33 | 33 | if($itemagruparel != "" && !in_array($itemagruparel,$itensrel)) |
34 | 34 | {$itensrel[] = $itemagruparel;} |
35 | - | |
36 | 35 | $mapa = ms_newMapObj($map_file); |
37 | 36 | if($ext && $ext != ""){ |
38 | 37 | $e = explode(" ",$ext); |
39 | 38 | $extatual = $mapa->extent; |
40 | 39 | $extatual->setextent((min($e[0],$e[2])),(min($e[1],$e[3])),(max($e[0],$e[2])),(max($e[1],$e[3]))); |
41 | 40 | } |
42 | - | |
43 | 41 | $layer = $mapa->getlayerbyname($temarel); |
44 | 42 | $layer->set("template","none.html"); |
45 | 43 | $existesel = "nao"; |
... | ... | @@ -47,7 +45,7 @@ $existesel = "nao"; |
47 | 45 | if (file_exists($map_file."qy")) |
48 | 46 | {$mapa->loadquery($map_file."qy");} |
49 | 47 | */ |
50 | -carregaquery($map_file,&$layer,&$mapa); | |
48 | +carregaquery2($map_file,$layer,$mapa); | |
51 | 49 | if ($layer->getNumresults() > 0){$existesel = "sim";} |
52 | 50 | if ($existesel == "nao") |
53 | 51 | {$layer->querybyrect($mapa->extent);} | ... | ... |
geraminiatura.php
... | ... | @@ -132,7 +132,7 @@ function verificaMiniatura($map,$tipo,$admin=false) |
132 | 132 | $layern = $nmapa->getLayerByName($teman); |
133 | 133 | $layern->set("status",MS_DEFAULT); |
134 | 134 | ms_newLayerObj($mapa, $layern); |
135 | - autoClasses(&$layern,$mapa,$locaplic); | |
135 | + autoClasses($layern,$mapa,$locaplic); | |
136 | 136 | if ($layern->data == "") |
137 | 137 | $dados = $layern->connection; |
138 | 138 | else |
... | ... | @@ -157,7 +157,7 @@ function verificaMiniatura($map,$tipo,$admin=false) |
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
160 | - zoomTemaMiniatura($pegarext,&$mapa); | |
160 | + zoomTemaMiniatura($pegarext,$mapa); | |
161 | 161 | if ($tipo == "mini" || $tipo == "todos") |
162 | 162 | { |
163 | 163 | $mapa->setsize(50,50); | ... | ... |
ms_criamapa.php
... | ... | @@ -612,7 +612,7 @@ function incluiTemasIniciais() |
612 | 612 | if ($layern->name == "estadosl") |
613 | 613 | {$layern->set("data",$locaplic."/aplicmap/dados/estados.shp");} |
614 | 614 | $layern->setmetadata("NOMEORIGINAL",$layern->name); |
615 | - autoClasses(&$layern,$mapn); | |
615 | + autoClasses($layern,$mapn); | |
616 | 616 | // |
617 | 617 | //necessário para não alterar a extensão do mapa por esse parâmetro |
618 | 618 | // |
... | ... | @@ -634,7 +634,7 @@ function incluiTemasIniciais() |
634 | 634 | $layern->set("type",$tipotemp); |
635 | 635 | $layern->set("status",statustemp); |
636 | 636 | } |
637 | - ms_newLayerObj(&$mapn, $layern); | |
637 | + ms_newLayerObj($mapn, $layern); | |
638 | 638 | } |
639 | 639 | } |
640 | 640 | } |
... | ... | @@ -644,7 +644,7 @@ function incluiTemasIniciais() |
644 | 644 | // |
645 | 645 | if($existeraster) |
646 | 646 | { |
647 | - $of = &$mapn->outputformat; | |
647 | + $of = $mapn->outputformat; | |
648 | 648 | $of->set("imagemode",MS_IMAGEMODE_RGB); |
649 | 649 | } |
650 | 650 | erroCriacao(); |
... | ... | @@ -1059,7 +1059,7 @@ function incluiMapaGvsig($gvsiggvp,$gvsigview){ |
1059 | 1059 | include_once($locaplic."/pacotes/gvsig/gvsig2mapfile/class.gvsig2mapfile.php"); |
1060 | 1060 | $gm = new gvsig2mapfile($gvsiggvp); |
1061 | 1061 | $dataView = $gm->getViewData($gvsigview); |
1062 | - //var_dump($dataView); | |
1062 | + //var_dump($dataView);exit; | |
1063 | 1063 | $lnames = $mapn->getalllayernames(); |
1064 | 1064 | foreach($lnames as $name){ |
1065 | 1065 | $layer = $mapn->getlayerbyname($name); | ... | ... |
ogc.php
... | ... | @@ -231,7 +231,7 @@ if ($tipo == "" || $tipo == "metadados") |
231 | 231 | } |
232 | 232 | } |
233 | 233 | } |
234 | - autoClasses(&$l,$oMap); | |
234 | + autoClasses($l,$oMap); | |
235 | 235 | $permite = $l->getmetadata("permiteogc"); |
236 | 236 | if($permite != "nao") |
237 | 237 | ms_newLayerObj($oMap, $l); | ... | ... |
testamapfile.php
... | ... | @@ -197,7 +197,7 @@ function verifica($map,$solegenda) |
197 | 197 | } |
198 | 198 | } |
199 | 199 | |
200 | - autoClasses(&$layern,$nmapa); | |
200 | + autoClasses($layern,$nmapa); | |
201 | 201 | if($layern->classitem != "" && $layern->connectiontype == 7 && $layern->numclasses > 0 && $layern->getmetadata("wms_sld_body") == ""){ |
202 | 202 | $tipotemp = $layern->type; |
203 | 203 | $tiporep = $layern->getmetadata("tipooriginal"); |
... | ... | @@ -219,7 +219,7 @@ function verifica($map,$solegenda) |
219 | 219 | $dados = $layern->data; |
220 | 220 | $pegarext = $teman; |
221 | 221 | } |
222 | - zoomTema($pegarext,&$mapa); | |
222 | + zoomTema($pegarext,$mapa); | |
223 | 223 | if ($tipo == "mini") |
224 | 224 | { |
225 | 225 | $mapa->setsize(50,50); | ... | ... |