Changeset 275

Show
Ignore:
Timestamp:
02/22/08 23:20:32 (9 months ago)
Author:
aarkerio
Message:

Update karamelo to 1.2 cake version

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/news_controller.php

    r247 r275  
    1313  public $helpers          = array('Ajax', 'Fck', 'News', 'Time', 'Gags'); 
    1414   
    15   //public $components       = array('Portal'); 
     15  public $components       = array('Portal'); 
     16 
    1617  public function isAuthorized() 
    1718  { 
    18              if (isset($this->params[Configure::read('Routing.admin')])) 
    19                     { 
    20                              if ($this->Auth->user('group_id') != 1) 
    21                                       { 
    22                                                    return false; 
    23                                                              } 
    24                                                             } 
    25                                                                return true; 
     19      if (isset($this->params[Configure::read('Routing.admin')])) 
     20      { 
     21                 if ($this->Auth->user('group_id') != 1) 
     22                 { 
     23                           return false; 
     24                 } 
     25      } 
     26     return true; 
    2627  } 
    2728                                                                  
     
    4041        $limit      = 15; 
    4142         
    42         $this->set('data', $this->News->findAll()); 
    43          
    44         // $this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 
     43        $this->set('data', $this->News->findAll($conditions)); 
     44         
     45        $this->Portal->statics(); // Charge Portal components aka Sidebars 
    4546    } 
    4647     
     
    5354         
    5455        $this->layout = 'portal'; 
     56 
     57        $this->pageTitle = '::News'; 
    5558         
    5659        $conditions = array("News.status"=>1, "News.id"=>$id); 
     
    5861        $fields     = array("News.id", "News.title", "News.comments", "News.body", "News.created", "News.reference", "News.theme_id", "News.user_id", "Theme.img", "Theme.theme", "User.username"); 
    5962         
    60         $this->pageTitle = '::News'; 
    61          
    6263        $this->set('data', $this->News->find($conditions, $fields)); 
    6364         
    64         // $this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 
     65        $this->Portal->statics(); // Charge Portal components aka Sidebars 
    6566    } 
    6667