mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
4eec4b6977
|
@ -767,7 +767,7 @@ function addDocumentLink($request, $response, $args) { /* {{{ */
|
|||
$params = $request->getParsedBody();
|
||||
$public = !isset($params['public']) ? true : false;
|
||||
if ($sourcedoc->addDocumentLink($targetdoc->getId(), $userobj->getID(), $public)){
|
||||
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$rec), 201);
|
||||
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 201);
|
||||
} else {
|
||||
return $response->withJson(array('success'=>false, 'message'=>'Could not create document link', 'data'=>''), 500);
|
||||
}
|
||||
|
@ -1214,10 +1214,16 @@ function doSearch($request, $response) { /* {{{ */
|
|||
|
||||
$params = $request->getQueryParams();
|
||||
$querystr = $params['query'];
|
||||
$mode = $params['mode'];
|
||||
if(!$limit = $params['limit'])
|
||||
$mode = isset($params['mode']) ? $params['mode'] : '';
|
||||
if(!isset($params['limit']) || !$limit = $params['limit'])
|
||||
$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) {
|
||||
return $response->withJson(array(), 200);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user