From f2bdd1affc70b5e06662d61d8edfc62902a2302e Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 6 Mar 2013 08:44:26 +0000 Subject: [PATCH] fix parameter error in search action --- application/default/controllers/ServiceController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index bf8859dd..65599fce 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -114,11 +114,11 @@ class ServiceController extends Zend_Controller_Action //$end=$this->_request->getParam('end'); $sql="select id,title,uuid,substring(description for 400) as description,filesize,fileformat from normalmetadata where east? and north?"; if (!empty($key)) { - $search=new Search($key); + $search=new SimpleSearch($key); $where=$search->sql_expr(array("title","description")); $sql.= " and ".$where; - $sql.= " order by title"; - $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s,'%'.$key.'%','%'.$key.'%')); + $sql.= " order by title"; + $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s)); } else { $sql.= " order by title limit 10"; $rows=$this->db->fetchAll($sql,array($e,$w,$n,$s));