Make upload_target_type hint compatible with old 3-letter shortcuts

This commit is contained in:
Kijin Sung 2024-10-07 22:38:53 +09:00
parent 798733cf11
commit 6c07ce75e6

View file

@ -32,7 +32,7 @@ class FileModel extends File
// Get uploaded files
if($upload_target_srl)
{
if (!$upload_target_type || $upload_target_type === 'document')
if (!$upload_target_type || $upload_target_type === 'doc' || $upload_target_type === 'document')
{
$oDocument = DocumentModel::getDocument($upload_target_srl);
}
@ -44,7 +44,7 @@ class FileModel extends File
// Check permissions of the comment
if(!$oDocument || !$oDocument->isExists())
{
if (!$upload_target_type || $upload_target_type === 'comment')
if (!$upload_target_type || $upload_target_type === 'com' || $upload_target_type === 'comment')
{
$oComment = CommentModel::getComment($upload_target_srl);
if($oComment->isExists())