diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 11adc205..2b380398 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -148,7 +148,15 @@ class Admin_ReviewController extends Zend_Controller_Action if($cancel>0) { if($this->changestatus($cancel,-1)) - { + { + //update search document + $search=new Search(); + //create search view in xunsearch + $sql="select * from xunsearch where uuid in (select uuid from metadata where id=?)"; + $sth = $this->db->prepare($sql); + $sth->execute(array($cancel)); + $data = $sth->fetch(); + $search->update($data); $this->messenger->addMessage('操作成功:已取消该数据的评审'); $this->_redirect("/admin/review/accept"); } @@ -743,7 +751,18 @@ class Admin_ReviewController extends Zend_Controller_Action else $ids=$update; if($this->changestatus($ids,1)) - { + { + //update search document + $search=new Search(); + //create search view in xunsearch + $sql="select * from xunsearch where uuid in (select uuid from metadata where id in (?))"; + $sth = $this->db->prepare($sql); + $sth->execute(array($ids)); + while ($data = $sth->fetch()) + { + $search->update($data); + } + //仅对单条数据发送email信息,并且注册为数据作者 if (is_numeric($ids)) {