/** * Rate the ticket note * @param integer $id * @param integer $stars */ public static function Vote($id, $stars) { if (!empty($stars) && is_numeric($stars)) { $Note = Doctrine::getTable('TicketsNotes')->find($id); $Note->vote = $stars; $Note->save(); Tickets::updateTickectVote($id); return true; } return false; }