fix creation of sub folders (Closes: #469)

This commit is contained in:
Uwe Steinmann 2020-04-21 17:23:14 +02:00
parent e5a56f5eba
commit ea46cce2df
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
- add norwegian translation
- pass configuration to init() of extension (backport from 6.0.x)
- place comment of version below version data (remove extra column, backport from 6.0.x)
- fix creating folders via restapi (Closes: #469)
--------------------------------------------------------------------------------
Changes in version 5.1.15

View File

@ -412,7 +412,7 @@ function createFolder($request, $response, $args) { /* {{{ */
}
/* Check if name already exists in the folder */
if(!$settings->_enableDuplicateSubFolderNames) {
if($folder->hasSubFolderByName($params['name'])) {
if($parent->hasSubFolderByName($params['name'])) {
return $response->withJson(array('success'=>false, 'message'=>getMLText("subfolder_duplicate_name"), 'data'=>''), 400);
}
}