mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
calling /folder/ with an id will return the root folder
This commit is contained in:
parent
80c5934eb1
commit
1a9f6895f7
|
@ -182,10 +182,13 @@ function getLockedDocuments() { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
function getFolder($id) { /* {{{ */
|
||||
global $app, $dms, $userobj;
|
||||
function getFolder($id = null) { /* {{{ */
|
||||
global $app, $dms, $userobj, $settings;
|
||||
$forcebyname = $app->request()->get('forcebyname');
|
||||
if(is_numeric($id) && empty($forcebyname))
|
||||
|
||||
if ($id === null)
|
||||
$folder = $dms->getFolder($settings->_rootFolderID);
|
||||
else if(is_numeric($id) && empty($forcebyname))
|
||||
$folder = $dms->getFolder($id);
|
||||
else {
|
||||
$parentid = $app->request()->get('parentid');
|
||||
|
@ -1414,6 +1417,7 @@ $app->get('/logout', 'doLogout');
|
|||
$app->get('/account', 'getAccount');
|
||||
$app->get('/search', 'doSearch');
|
||||
$app->get('/searchbyattr', 'doSearchByAttr');
|
||||
$app->get('/folder/', 'getFolder');
|
||||
$app->get('/folder/:id', 'getFolder');
|
||||
$app->post('/folder/:id/move', 'moveFolder');
|
||||
$app->delete('/folder/:id', 'deleteFolder');
|
||||
|
|
Loading…
Reference in New Issue
Block a user