Commit 33c86d2c330bffdf296c72b202968e18bed8167e

Authored by Edmar Moretti
1 parent 24e503bf

Correção em variáveis PHP não definidas e que geram mensagens de log

Showing 2 changed files with 9 additions and 9 deletions   Show diff stats
admin/php/admin.php
... ... @@ -193,7 +193,7 @@ function pegaDados($sql,$dbh="",$close=true)
193 193 $resultado = array();
194 194 //is_string para efeitos de compatibilidade
195 195 if($dbh == "" || is_string($dbh)){
196   - include(dirname(__FILE__)."/../../admin/php/conexao.php");
  196 + include(dirname(__FILE__)."/../../classesphp/conexao.php");
197 197 }
198 198 error_reporting(0);
199 199 //$dbh deve ser definido com somente leitura, mas por prevencao:
... ...
ms_criamapa.php
... ... @@ -241,7 +241,10 @@ if(!isset($funcao)){
241 241 */
242 242 include_once (dirname(__FILE__)."/classesphp/sani_request.php");
243 243 include_once (dirname(__FILE__)."/classesphp/funcoes_gerais.php");
244   - $interface = $GET["interface"];
  244 + if(!isset($_GET["interface"])){
  245 + $_GET["interface"] = "";
  246 + }
  247 + $interface = $_GET["interface"];
245 248 }
246 249 $parurl = array_merge($_GET,$_POST);
247 250 //
... ... @@ -372,10 +375,7 @@ $expoeMapfile_ = $expoeMapfile;
372 375 $googleApiKey_ = $googleApiKey;
373 376 $mensagemInicia_ = $mensagemInicia;
374 377 $interfacePadrao_ = $interfacePadrao;
375   -if(isset($interface)){
376   - $interface_ = $interface;
377   -}
378   -else{
  378 +if(empty($interface)){
379 379 $interface_ = $interfacePadrao;
380 380 }
381 381 if(isset($kmlurl)){
... ... @@ -554,7 +554,7 @@ if (!isset ($map_reference_image)){
554 554 if (!isset ($map_reference_extent)){
555 555 $map_reference_extent = $map->reference->extent->minx." ".$map->reference->extent->miny." ".$map->reference->extent->maxx." ".$map->reference->extent->maxy;
556 556 }
557   -if(!isset($interface)){
  557 +if(empty($interface)){
558 558 if(!isset($interfacePadrao)){
559 559 $interfacePadrao = "ol.htm";
560 560 }
... ... @@ -668,7 +668,7 @@ adaptaLayers($tmpfname,$versao);
668 668 // require_once(dirname(__FILE__)."/ms_registraip.php");
669 669 //}
670 670 if ($interface != "mashup"){
671   - abreInterface($interface,$caminho,$tempo);
  671 + abreInterface($interface,$caminho);
672 672 }
673 673  
674 674 /*
... ... @@ -729,7 +729,7 @@ function adaptaLayers($tmpfname,$versao){
729 729 /*
730 730 Redireciona para o HTML definido em $interface, abrindo o mapa
731 731 */
732   -function abreInterface($interface,$caminho,$tempo){
  732 +function abreInterface($interface,$caminho){
733 733 $nomeInterface = explode(".",basename($interface));
734 734 if (count(explode(".php",$interface)) > 1){
735 735 if(file_exists($caminho."interface/".$interface)){
... ...