diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 2f5034f5..f6d2ab1d 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -2161,8 +2161,15 @@ class Admin_DataController extends Zend_Controller_Action left join metadata m on s.uuid=m.uuid WHERE v.id=?"; $sth = $this->db->prepare($sql); $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)) //无对应记录 { $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); 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) { $msg = "提交失败,请确认权限后重试"; if($this->debug>0)