  | 40 | 40 | | class AppController extends Controller { |
| | 41 | 41 | | |
| | 42 | 42 | | var $components = array('Auth', 'StdFuncs','MyAcl','Menu','RequestHandler'); |
  | 43 | | - | var $helpers = array('Html','Ajax','Javascript'); |
| | | 43 | + | var $helpers = array('Html','Ajax','Javascript', 'Tree'); |
| 44 | 44 | | var $layout = 'green'; |
  | | 45 | + | var $main_menu_id = -1; |
| 45 | 46 | | |
| | 46 | 47 | | function setFlash($msg,$key){ |
| | 47 | 48 | | $_SESSION['Message'][$key][]=$msg; |
| |
|
|
 |
… |
| 64 | 65 | | |
| | 65 | 66 | | $this->Auth->authorize = 'controller'; |
| | 66 | 67 | | |
  | 67 | | - | |
| | 68 | | - | $this->set('mainMenu',$this->Menu->createMenu($this->Session->read('main_menu_id'))); |
| | 69 | | - | $this->set('subMenu',$this->Menu->createMenu($this->Session->read('sub_menu_id'))); |
| | | 68 | + | //pr($this->Menu->createMenu($this->main_menu_id)); |
| | | 69 | + | $this->set('Menu',$this->Menu->createMenu($this->main_menu_id)); |
  | 70 | 70 | | |
| | 71 | 71 | | if(isset($this->needsproject)){ |
| | 72 | 72 | | if((is_array($this->needsproject) && in_array($this->action, $this->needsproject)) || $this->needsproject===true){ //If the controller/action needs a project |