fix parameter error in search action
This commit is contained in:
parent
c91f2d2bea
commit
f2bdd1affc
|
@ -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 west>? and north<? and south>?";
|
||||
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.'%'));
|
||||
$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));
|
||||
|
|
Loading…
Reference in New Issue