Commit 680d0dfa6a754b0e2030f14b41029264e31e9365

Authored by Edmar Moretti
1 parent d37cb7dc

Modificadas as funções de busca de grupos e subgrupos da árvore de menus

classesphp/classe_menutemas.php
... ... @@ -147,7 +147,7 @@ return:
147 147  
148 148 array
149 149 */
150   - function pegaListaDeGrupos($idmenu="",$listasistemas="sim",$listasgrupos="sim")
  150 + function pegaListaDeGrupos($idmenu="",$listasistemas="sim",$listasgrupos="sim",$menutemas)
151 151 {
152 152 $this->xml = "";
153 153 if (file_exists("../ms_configura.php"))
... ... @@ -167,6 +167,13 @@ array
167 167 else
168 168 {$this->xml = simplexml_load_file("menutemas/menutemas.xml");}
169 169 }
  170 + if ($this->xml == "")
  171 + {
  172 + if (file_exists("../menutemas/menutemas.xml"))
  173 + {$this->xml = simplexml_load_file("../menutemas/menutemas.xml");}
  174 + else
  175 + {$this->xml = simplexml_load_file("menutemas/menutemas.xml");}
  176 + }
170 177 $sistemas = array();
171 178 $grupos = array();
172 179 $temasraiz = array();
... ... @@ -330,6 +337,13 @@ array
330 337 else
331 338 {$this->xml = simplexml_load_file("menutemas/menutemas.xml");}
332 339 }
  340 + if ($this->xml == "")
  341 + {
  342 + if (file_exists("../menutemas/menutemas.xml"))
  343 + {$this->xml = simplexml_load_file("../menutemas/menutemas.xml");}
  344 + else
  345 + {$this->xml = simplexml_load_file("menutemas/menutemas.xml");}
  346 + }
333 347 $conta = 0;
334 348 $subgrupos[] = array();
335 349 foreach($this->xml->GRUPO as $grupo)
... ...
classesphp/mapa_controle.php
... ... @@ -1544,7 +1544,7 @@ Include:
1544 1544 if(!isset($idmenu)){$idmenu="";}
1545 1545 if(!isset($listasistemas)){$listasistemas="nao";}
1546 1546 if(!isset($listasgrupos)){$listasgrupos="sim";}
1547   - $cp->set_data(array("grupos"=>$m->pegaListaDeGrupos($idmenu,$listasistemas,$listasgrupos)));
  1547 + $cp->set_data(array("grupos"=>$m->pegaListaDeGrupos($idmenu,$listasistemas,$listasgrupos,$menutemas)));
1548 1548 break;
1549 1549 /*
1550 1550 Property: pegalistadeSubgrupos
... ...