From 012c783e1c1952923b48e2599e511c1ded9bed68 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 23 Jan 2013 02:59:10 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=85=83=E6=95=B0=E6=8D=AE=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E5=BA=94=E7=9A=84=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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)