propperly check for duplicate folder names in op/op.Ajax.php

This commit is contained in:
Uwe Steinmann 2024-09-29 07:17:31 +02:00
parent 8a217a9254
commit 8bcf76ca8c
2 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@
- clearing cache of js files works for a large number of files
- WebDAV returns `quota-used-bytes` and `quota-available-bytes`
- fix settings SeedDMS attributes in WebDAV server
- propperly check for duplicate folder names in op/op.Ajax.php
--------------------------------------------------------------------------------
Changes in version 5.1.35

View File

@ -1090,10 +1090,10 @@ switch($command) {
$name = utf8_basename($userfilename);
/* Check if name already exists in the folder */
if(!$settings->_enableDuplicateDocNames) {
if($folder->hasDocumentByName($name)) {
if(!$settings->_enableDuplicateSubFolderNames) {
if($folder->hasSubFolderByName($name)) {
header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>getMLText("document_duplicate_name")));
echo json_encode(array('success'=>false, 'message'=>getMLText("subfolder_duplicate_name")));
exit;
}
}