Commit 980f7cdefecbf41bc6fd7dd17d85f05d350162f8

Authored by Edmar Moretti
1 parent bd5ad289

Correções na listagem de menus quando forem especificados mais de um arquivo em $menutemas

Showing 1 changed file with 9 additions and 2 deletions   Show diff stats
@@ -42,9 +42,13 @@ else @@ -42,9 +42,13 @@ else
42 { 42 {
43 foreach($menutemas as $m) 43 foreach($menutemas as $m)
44 { 44 {
  45 + if(file_exists($m))
45 $menus[] = $m["arquivo"]; 46 $menus[] = $m["arquivo"];
46 } 47 }
47 } 48 }
  49 +if(!isset($menus))
  50 +$menus = array("/opt/www/html/i3geo/menutemas/menutemas.xml");
  51 +
48 echo "<Document><name>Menu i3geo</name><open>0</open><description></description><visibility>0</visibility>"; 52 echo "<Document><name>Menu i3geo</name><open>0</open><description></description><visibility>0</visibility>";
49 foreach ($menus as $menu) 53 foreach ($menus as $menu)
50 { 54 {
@@ -70,12 +74,15 @@ foreach ($menus as $menu) @@ -70,12 +74,15 @@ foreach ($menus as $menu)
70 $desc = mb_convert_encoding($tema->TDESC,"auto","auto"); 74 $desc = mb_convert_encoding($tema->TDESC,"auto","auto");
71 $id = mb_convert_encoding($tema->TID,"auto","auto"); 75 $id = mb_convert_encoding($tema->TID,"auto","auto");
72 $fonte = mb_convert_encoding($tema->TLINK,"auto","auto"); 76 $fonte = mb_convert_encoding($tema->TLINK,"auto","auto");
  77 + $tipoa = "";
  78 + if($tema->TIPOA)
  79 + $tipoa = mb_convert_encoding($tema->TIPOA,"auto","auto");
73 $ogc = sim; 80 $ogc = sim;
74 if($tema->TID) 81 if($tema->TID)
75 { 82 {
76 - $ogc = mb_convert_encoding($tema->OGC,"auto","auto"); 83 + $kml = mb_convert_encoding($tema->KML,"auto","auto");
77 } 84 }
78 - if(strtolower($ogc != "nao")) 85 + if(strtolower($kml != "nao") && strtolower($tipoa != "wms"))
79 { 86 {
80 echo "<GroundOverlay>"; 87 echo "<GroundOverlay>";
81 echo "<name>$nome</name>"; 88 echo "<name>$nome</name>";