Changeset 744 for trunk/app/controllers

Show
Ignore:
Timestamp:
08/30/08 18:26:22 (3 months ago)
Author:
aarkerio
Message:

Little Bugs fixed

Files:
1 modified

Legend:

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

    r732 r744  
    4646 public function admin_points($participation_id, $sense) 
    4747 { 
    48    $points = $this->Participation->field('points', array('Participation.id'=>$participation_id)); 
     48   $points = (int) $this->Participation->field('points', array('Participation.id'=>$participation_id)); 
    4949    
    5050   $points = ($sense == 'up' ) ? ($points + 1) : ($points - 1); 
     
    5454   $this->data['Participation']['points']   = $points; 
    5555      
    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'); 
    5959   endif; 
    6060 }