Changeset 742 for trunk/app/controllers

Show
Ignore:
Timestamp:
08/27/08 20:54:25 (3 months ago)
Author:
aarkerio
Message:

Little Bugs fixed

Files:
1 modified

Legend:

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

    r696 r742  
    4141 } 
    4242  
    43  /**    ---  ADMIN METHODS  ---  **/ 
     43 /**===    ADMIN METHODS  ===**/ 
    4444  
     45 public function admin_points($reply_id, $sense) 
     46 { 
     47   $points = (int) $this->Reply->field('points', array('Reply.id'=>$reply_id)); 
     48    
     49   $points = ($sense == 'up' ) ? ($points + 1) : ($points - 1); 
     50 
     51   $this->data['Reply']['id']       = $reply_id;     
     52       
     53   $this->data['Reply']['points']   = $points; 
     54      
     55   if ($this->Reply->save($this->data)): 
     56             $this->set('points', $points); 
     57         $this->render('admin_points', 'ajax'); 
     58   endif; 
     59 } 
     60 
    4561 public function admin_edit($id = null) 
    4662 {