From cc2406aee56aa254ff1ef4aae6b2d8c925e66a8b Mon Sep 17 00:00:00 2001 From: Jianxuan Li Date: Mon, 12 Jan 2015 23:43:37 +0800 Subject: [PATCH] change details in Review Service --- Westdc/Review/Review.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Westdc/Review/Review.php b/Westdc/Review/Review.php index 77c0a83..6eec2c0 100644 --- a/Westdc/Review/Review.php +++ b/Westdc/Review/Review.php @@ -119,7 +119,7 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac RIGHT JOIN metadata md ON md.uuid=m.uuid LEFT JOIN users u ON u.id=m.userid 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->limitSql}"; @@ -127,6 +127,8 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac return $rs->fetchAll(); }//getDraft() + + /** * 取消评审 * @param $id @@ -135,6 +137,9 @@ class Review extends AbstractEventManager implements ServiceManagerAwareInterfac public function cancel($id){ if(!is_numeric($id) || $id<1) return false; + + $this->getEventManager()->trigger('review.canceled', $this, compact('id')); + return $this->changeStatus($id,self::REVIEW_STATUS_CANCELED); }