Changeset 742 for trunk/app/controllers
- Timestamp:
- 08/27/08 20:54:25 (3 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/replies_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/replies_controller.php
r696 r742 41 41 } 42 42 43 /** --- ADMIN METHODS ---**/43 /**=== ADMIN METHODS ===**/ 44 44 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 45 61 public function admin_edit($id = null) 46 62 {
