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));