From 189ca93957a4767fc69ddfa61522386519f4fcc0 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 12 Jul 2012 04:08:28 +0000 Subject: [PATCH] fix search error and omit warning info --- application/default/controllers/AuthorController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index 21753761..3e63682e 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -379,7 +379,7 @@ class AuthorController extends Zend_Controller_Action LEFT JOIN mdauthor a ON m.uuid=a.uuid LEFT JOIN geonetworkmetadata g on m.uuid=g.uuid LEFT JOIN mdstatus mds ON m.uuid=mds.uuid - WHERE a.userid=? AND a.status>=0"; + WHERE a.userid=? AND a.status>=0 "; if ($ac=='search') { $key = trim($this->_request->getParam('q')); @@ -388,7 +388,7 @@ class AuthorController extends Zend_Controller_Action $where=$search->sql_expr(array("m.title","m.description")); $sql.=' and '.$where; } - $sql.="ORDER BY a.status DESC,a.id DESC"; + $sql.=" ORDER BY a.status DESC,a.id DESC"; $sth = $this->db->prepare($sql); $sth->execute(array($u_id)); @@ -1726,7 +1726,7 @@ class AuthorController extends Zend_Controller_Action { //导入元数据 $iso=new ISO19115(); - $iso->saveDB($this->db,$row['xml']); + @$iso->saveDB($this->db,$row['xml']); //进入评审库 $sql="insert into mdstatus (uuid,status,userid) select uuid,0,? from mdversion where id=?"; $this->db->query($sql,array($u_id,$id)); @@ -1780,7 +1780,7 @@ class AuthorController extends Zend_Controller_Action } else { //说明是已发布的数据且数据不存在评审信息 //同步元数据 $iso=new ISO19115(); - $iso->saveDB($this->db,$row['xml']); + @$iso->saveDB($this->db,$row['xml']); //移除中间版本 $sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null"; $this->db->query($sql,array($id)); @@ -1819,7 +1819,7 @@ class AuthorController extends Zend_Controller_Action { //同步元数据 $iso=new ISO19115(); - $iso->saveDB($this->db,$row['xml']); + @$iso->saveDB($this->db,$row['xml']); //email to admin $mail=new WestdcMailer($this->view->config->smtp); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); @@ -1948,7 +1948,7 @@ class AuthorController extends Zend_Controller_Action { //同步元数据 $iso=new ISO19115(); - $iso->saveDB($this->db,$row['xml']); + @$iso->saveDB($this->db,$row['xml']); //移除中间版本 $sql="delete from mdversion where uuid in (select uuid from mdversion where id=?) and changelog is null"; $this->db->query($sql,array($id));