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; } }