コード例 #1
0
ファイル: Issue.class.php プロジェクト: qcodo/qcodo-website
 /**
  * This will clear or delete the vote on this issue by the given person (if applicable)
  * and refresh/udpate the vote count
  * @param Person $objPerson
  * @return void
  */
 public function ClearVote(Person $objPerson)
 {
     $objVote = IssueVote::LoadByIssueIdPersonId($this->intId, $objPerson->Id);
     if ($objVote) {
         $objVote->Delete();
     }
     $this->intVoteCount = IssueVote::CountByIssueId($this->intId);
     $this->Save();
 }