后台实现英文元数据同步

This commit is contained in:
wlx 2013-11-10 10:30:29 +00:00
parent 0457fc712e
commit e31ccb7cc6
1 changed files with 3 additions and 3 deletions

View File

@ -196,12 +196,12 @@ class Admin_DataController extends Zend_Controller_Action
$this->import($rs->data); $this->import($rs->data);
$this->db->exec($this->db->quoteInto("update en.metadata set source=? where uuid='$uuid'",$rs->source)); $this->db->exec($this->db->quoteInto("update en.metadata set source=? where uuid='$uuid'",$rs->source));
$userid = Zend_Auth::getInstance()->getIdentity()->id; $userid = Zend_Auth::getInstance()->getIdentity()->id;
$this->db->query("insert into mdstatus (uuid,status,ts_accepted,userid) select uuid,1,now(),? $this->db->query("insert into en.mdstatus (uuid,status,ts_accepted,userid) select uuid,1,now(),?
from en.geonetworkmetadata gn where uuid not in (select uuid from mdstatus) and uuid=?",array($userid,$uuid)); from en.geonetworkmetadata gn where uuid not in (select uuid from en.mdstatus) and uuid=?",array($userid,$uuid));
$this->view->msg='成功同步元数据:'.$uuid; $this->view->msg='成功同步元数据:'.$uuid;
//update search document //update search document
$search=new Search(); $search=new Search();
$sql="select * from xunsearch where uuid=?"; $sql="select * from en.xunsearch where uuid=?";
$sth = $this->db->prepare($sql); $sth = $this->db->prepare($sql);
$sth->setFetchMode(Zend_Db::FETCH_ASSOC); $sth->setFetchMode(Zend_Db::FETCH_ASSOC);
$sth->execute(array($uuid)); $sth->execute(array($uuid));