Assembla home | Assembla project page
 

Changeset 115

Show
Ignore:
Timestamp:
07/18/07 19:59:26 (1 year ago)
Author:
AD7six
Message:

Controller changes related to changing menu generation from requestAction to component based.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/controllers/menus_controller.php

    r102 r115  
    137137                } 
    138138        } 
    139  
    140         function index($sectionId = null) { 
    141                 $data = $this->Menu->findAll(array( 
    142                         'Menu.section_id' => $sectionId, 
    143                         'Menu.published' => 1, 
    144                         'Menu.access_level' => '<= '.$this->othAuth->group('level')), null, 'Menu.lft',null,null,-1); 
    145                 $data = $this->Menu->__doThread($data, null); 
    146                 if ($this->othAuth->check()) { 
    147                         $data[]['Menu'] = array('name' => 'logout', 'parent_id' => null, 'url' => array('controller' => 'users', 'action' => 'logout')); 
    148                 } else { 
    149                         $data[]['Menu'] = array('name' => 'login', 'parent_id' => null, 'url' => array('controller' => 'users', 'action' => 'login')); 
    150                 } 
    151                 if (isset($this->params['requested'])) { 
    152                         return $data; 
    153                 } 
    154                 $this->set('menus', $data); 
    155         } 
    156  
    157139} 
    158140?> 
  • branch/controllers/users_controller.php

    r113 r115  
    125125        } 
    126126         
    127 function login() 
     127       function login() 
    128128        { 
    129129                if( isset ( $this->data ) ) 
    130130                { 
     131                        $this->Session->del('element_data.Nav'); 
    131132                        if ($this->Conf->get('general.enable_captcha')) 
    132133                        {