log if doc has duplicate name

This commit is contained in:
Uwe Steinmann 2022-12-11 15:20:45 +01:00
parent 26b7ec2d69
commit bbc94a90bb

View File

@ -581,6 +581,7 @@ class SeedDMS_ExtPaperless_RestAPI_Controller { /* {{{ */
/* Check if name already exists in the folder */
if(!$settings->_enableDuplicateDocNames) {
if($mfolder->hasDocumentByName($docname)) {
$logger->log('Duplicate document name '.$docname, PEAR_LOG_ERR);
return $response->withJson(getMLText("document_duplicate_name"), 409);
}
}