修复错误,实现元数据版本更新对应的搜索更新

This commit is contained in:
wlx 2013-01-23 02:59:10 +00:00
parent b395489392
commit 012c783e1c
1 changed files with 9 additions and 6 deletions

View File

@ -2163,6 +2163,13 @@ class Admin_DataController extends Zend_Controller_Action
$sth->execute(array($id)); $sth->execute(array($id));
$row = $sth->fetch(); $row = $sth->fetch();
$sql="select * from xunsearch where uuid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($row['uuid']));
$data = $sth->fetch();
$search=new Search();
$search->update($data);
if (empty($row)) //无对应记录 if (empty($row)) //无对应记录
{ {
$sql="select m.id from metadata m left join mdversion v on m.uuid=v.uuid where v.id=?"; $sql="select m.id from metadata m left join mdversion v on m.uuid=v.uuid where v.id=?";
@ -2426,11 +2433,7 @@ class Admin_DataController extends Zend_Controller_Action
$this->jsonexit($data); $this->jsonexit($data);
return true; return true;
} }
$sql="select * from xunsearch whre uuid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($row['uuid']));
$row = $sth->fetch();
$search->update($row);
}catch(Exception $e) { }catch(Exception $e) {
$msg = "提交失败,请确认权限后重试"; $msg = "提交失败,请确认权限后重试";
if($this->debug>0) if($this->debug>0)