root/trunk/lib/model/ReportAnswer.php

Revision 88, 0.8 kB (checked in by fabien, 2 years ago)

updated to symfony 1.0 beta 1

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 require_once 'lib/model/om/BaseReportAnswer.php';
4
5
6 /**
7  * Skeleton subclass for representing a row from the 'ask_report_answer' table.
8  *
9  *
10  *
11  * You should add additional methods to this class to meet the
12  * application requirements.  This class will only be generated as
13  * long as it does not already exist in the output directory.
14  *
15  * @package model
16  */   
17 class ReportAnswer extends BaseReportAnswer
18 {
19   public function save($con = null)
20   {
21     $con = Propel::getConnection();
22     try
23     {
24       $con->begin();
25
26       $ret = parent::save();
27
28       // update spam_count in answer table
29       $answer = $this->getAnswer();
30       $answer->setReports($answer->getReports() + 1);
31       $answer->save();
32
33       $con->commit();
34
35       return $ret;
36     }
37     catch (Exception $e)
38     {
39       $con->rollback();
40       throw $e;
41     }
42   }
43 }
44
45 ?>
Note: See TracBrowser for help on using the browser.