实现元数据评审中的接收与取消对应的搜索更新和删除操作

This commit is contained in:
wlx 2013-01-23 03:28:22 +00:00
parent 10d46816cc
commit ffaee3f502
1 changed files with 21 additions and 2 deletions

View File

@ -149,6 +149,14 @@ class Admin_ReviewController extends Zend_Controller_Action
{
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");
}
@ -744,6 +752,17 @@ class Admin_ReviewController extends Zend_Controller_Action
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))
{