change details in Review Service

This commit is contained in:
Jianxuan Li 2015-01-12 23:43:37 +08:00
parent 23f3a7828c
commit cc2406aee5
1 changed files with 6 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac
RIGHT JOIN metadata md ON md.uuid=m.uuid RIGHT JOIN metadata md ON md.uuid=m.uuid
LEFT JOIN users u ON u.id=m.userid LEFT JOIN users u ON u.id=m.userid
LEFT JOIN geonetworkmetadata gn ON m.uuid=gn.uuid LEFT JOIN geonetworkmetadata gn ON m.uuid=gn.uuid
WHERE m.status=0 $searchJoin WHERE m.status=".self::REVIEW_STATUS_DEFAULT." $searchJoin
{$this->orderSql} {$this->sortSql} {$this->orderSql} {$this->sortSql}
{$this->limitSql}"; {$this->limitSql}";
@ -127,6 +127,8 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac
return $rs->fetchAll(); return $rs->fetchAll();
}//getDraft() }//getDraft()
/** /**
* 取消评审 * 取消评审
* @param $id * @param $id
@ -135,6 +137,9 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac
public function cancel($id){ public function cancel($id){
if(!is_numeric($id) || $id<1) if(!is_numeric($id) || $id<1)
return false; return false;
$this->getEventManager()->trigger('review.canceled', $this, compact('id'));
return $this->changeStatus($id,self::REVIEW_STATUS_CANCELED); return $this->changeStatus($id,self::REVIEW_STATUS_CANCELED);
} }