Fix #2238 add option to control whether to allow redeclaring documents

This commit is contained in:
Kijin Sung 2024-03-28 21:30:19 +09:00
parent 087b2587bf
commit fa756b5169
7 changed files with 37 additions and 7 deletions

View file

@ -3276,7 +3276,14 @@ class DocumentController extends Document
{
return $output;
}
if(Context::get('prevent_redeclare') !== 'Y')
{
$output = executeQuery('document.deleteDocumentDeclaredLog', $args);
if(!$output->toBool())
{
return $output;
}
}
$obj->return_message = 'success_declare_canceled';
}
else