check for duplicate folder names

This commit is contained in:
Uwe Steinmann 2019-07-01 11:48:53 +02:00
parent b1a895fb27
commit ad86df5fc5

View File

@ -99,6 +99,13 @@ if(!empty($_POST['notification_groups'])) {
}
}
/* Check if name already exists in the folder */
if(!$settings->_enableDuplicateSubFolderNames) {
if($folder->hasSubFolderByName($name)) {
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("subfolder_duplicate_name"));
}
}
$controller->setParam('folder', $folder);
$controller->setParam('name', $name);
$controller->setParam('comment', $comment);