Changeset 744 for trunk/app/controllers
- Timestamp:
- 08/30/08 18:26:22 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/participations_controller.php
r732 r744 46 46 public function admin_points($participation_id, $sense) 47 47 { 48 $points = $this->Participation->field('points', array('Participation.id'=>$participation_id));48 $points = (int) $this->Participation->field('points', array('Participation.id'=>$participation_id)); 49 49 50 50 $points = ($sense == 'up' ) ? ($points + 1) : ($points - 1); … … 54 54 $this->data['Participation']['points'] = $points; 55 55 56 if ($this->Participation->save($this->data )):57 $this->set('points', $points);58 $this->render('points', 'ajax');56 if ($this->Participation->save($this->data, false)): 57 $this->set('points', $points); 58 $this->render('admin_points', 'ajax'); 59 59 endif; 60 60 }
