From ffaee3f5022ab0f33204f706c812999569c8d3ff Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 23 Jan 2013 03:28:22 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=85=83=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E4=B8=AD=E7=9A=84=E6=8E=A5=E6=94=B6=E4=B8=8E?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=AF=B9=E5=BA=94=E7=9A=84=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=92=8C=E5=88=A0=E9=99=A4=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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)) {