实现同步时的搜索更新
This commit is contained in:
parent
43d1f26b1a
commit
10d46816cc
|
@ -190,7 +190,16 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$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 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));
|
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;
|
} else $this->view->msg='不存在此元数据:'.$uuid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue