From 10d46816cc185e791eecb266ee5e124d43a3cb85 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 23 Jan 2013 03:27:05 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=90=8C=E6=AD=A5=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E6=90=9C=E7=B4=A2=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index f6d2ab1d..89443e85 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -190,7 +190,16 @@ class Admin_DataController extends Zend_Controller_Action $userid = Zend_Auth::getInstance()->getIdentity()->id; $this->db->query("insert into mdstatus (uuid,status,ts_accepted,userid) select uuid,1,now(),? from geonetworkmetadata gn where uuid not in (select uuid from mdstatus) and uuid=?",array($userid,$uuid)); - $this->view->msg='成功同步元数据:'.$uuid; + $this->view->msg='成功同步元数据:'.$uuid; + //update search document + $search=new Search(); + $sql="select * from xunsearch where uuid=?"; + $sth = $this->db->prepare($sql); + $sth->setFetchMode(Zend_Db::FETCH_ASSOC); + $sth->execute(array($uuid)); + $data = $sth->fetch(); + $search->update($data); + } else $this->view->msg='不存在此元数据:'.$uuid; } }