From 8bcf76ca8c0031a7436bc3892374fe199b2359d6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 29 Sep 2024 07:17:31 +0200 Subject: [PATCH] propperly check for duplicate folder names in op/op.Ajax.php --- CHANGELOG | 1 + op/op.Ajax.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 75d387021..bdc4fb000 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 183908d31..4f72cb46d 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -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; } }