diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index 795021dd..442c3976 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -535,8 +535,9 @@ class ReviewController extends Zend_Controller_Action }// downattAction 下载附件 - function denyinviteAction(){ - + function denyinviteAction() + { + $id = $this->_request->getParam('id'); $uuid = $this->_request->getParam('uuid'); @@ -553,31 +554,12 @@ class ReviewController extends Zend_Controller_Action if($id==$userid) { - try{ - $sql = "select md.title,r.status,rp.status as expint from mdreview r - left join metadata md on md.uuid=r.uuid - left join mdexpertreview rp on rp.id=md.id - where r.id='$id' and r.uuid='$uuid' - "; - - $rs = $this->db->query($sql); - $rows = $rs->fetchAll(); - - if(empty($rows['expint'])) - { + $sql = "update mdexpertreview set status=-1 where id='$id' and uuid='$uuid'"; + if($this->db->exec($sql)) + $this->view->message = "您已经拒绝该元数据的评审邀请"; + else $this->view->message = "您无权限进行此操作"; - }else - { - if($rows['status']>=3 || $rows['expint']>=0) - { - $this->view->message = "该元数据的当前状态不能被拒绝对其的评审"; - }else{ - $sql = "update mdexpertreview set status=-1 where id='$id' and uuid='$uuid'"; - if($this->db->exec($sql)) - $this->view->message = "您已经拒绝该元数据的评审邀请"; - } - } }catch(Exception $e){ $this->view->message = $e->getMessage(); }