mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
check for more parameters doSearch()
This commit is contained in:
parent
9729d211eb
commit
bcefbca382
|
@ -1214,10 +1214,16 @@ function doSearch($request, $response) { /* {{{ */
|
||||||
|
|
||||||
$params = $request->getQueryParams();
|
$params = $request->getQueryParams();
|
||||||
$querystr = $params['query'];
|
$querystr = $params['query'];
|
||||||
$mode = $params['mode'];
|
$mode = isset($params['mode']) ? $params['mode'] : '';
|
||||||
if(!$limit = $params['limit'])
|
if(!isset($params['limit']) || !$limit = $params['limit'])
|
||||||
$limit = 5;
|
$limit = 5;
|
||||||
$resArr = $dms->search($querystr);
|
if(!isset($params['offset']) || !$offset = $params['offset'])
|
||||||
|
$offset = 0;
|
||||||
|
if(!isset($params['searchin']) || !$searchin = explode(",",$params['searchin']))
|
||||||
|
$searchin = array();
|
||||||
|
if(!isset($params['objects']) || !$objects = $params['objects'])
|
||||||
|
$objects = 0x3;
|
||||||
|
$resArr = $dms->search($querystr, $limit, $offset, 'AND', $searchin, null, null, array(), array(), array(), array(), array(), array(), array(), $objects);
|
||||||
if($resArr === false) {
|
if($resArr === false) {
|
||||||
return $response->withJson(array(), 200);
|
return $response->withJson(array(), 200);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user