Changeset 776 for trunk/app/controllers

Show
Ignore:
Timestamp:
09/23/08 22:04:26 (2 months ago)
Author:
aarkerio
Message:

Test Unit fixed

Location:
trunk/app/controllers
Files:
2 modified

Legend:

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

    r775 r776  
    3737  } 
    3838  
    39   /**    ===== ADMIN METHODS ====== **/ 
    40  public function admin_listing($paginate=0, $limit=20) 
    41  { 
    42    $this->layout    = 'admin'; 
    43  
    44    $this->pageTitle = __('Comments on entries', true); 
    45  
    46    //$this->Comment->bindModel(array('belongsTo'=> array('News' =>array('className'=> 'News', 'foreignKey'=> 'new_id' ))));    
    47     
    48    $this->paginate['fields'] = array('Comment.id','Entry.id','Entry.title','Comment.id','Comment.comment', 'Comment.created', 'Comment.user_id', 'Comment.status', 'User.username');  
    49    $this->paginate['conditions']   = null; 
    50    $this->paginate['order']        = "Comment.id DESC"; 
    51    $this->paginate['limit']        = 30; 
    52    $data = $this->paginate('Comment'); 
    53    $this->set(compact('data')); 
    54      
    55  } 
    56   
    57   // change status enabled/disabled actived 
    58   public function admin_change($comment_id, $status) 
    59   {  
     39 /**    ===== ADMIN METHODS ====== **/ 
     40 // change status enabled/disabled actived 
     41 public function admin_change($comment_id, $status) 
     42 {  
    6043    $this->data['Comment']['status'] = ($status == 0 ) ? 1 : 0; 
    6144      
     
    8770  { 
    8871    if ($this->Comment->del($comment_id)): 
    89        $this->msgFlash('Comment deleted', '/admin/comments/listing'); 
     72       $this->msgFlash(__('Comment deleted', true), '/admin/entries/comments/'); 
    9073    endif; 
    9174  } 
  • trunk/app/controllers/entries_controller.php

    r750 r776  
    9595  $order           = 'Entry.id DESC'; 
    9696  $limit           = 20; 
    97        
     97   
    9898  $entries = $this->Entry->findAll($conditions, $fields, $order, $limit); 
    99    
    10099  $this->set(compact('channelData', 'entries')); 
    101  
    102100 } 
    103101