Fix #1901 always delete thumbnail directory when deleting document or comment

This commit is contained in:
Kijin Sung 2022-03-21 14:14:37 +09:00
parent 933175971e
commit 418c2b9dfa
2 changed files with 6 additions and 5 deletions

View file

@ -1179,7 +1179,7 @@ class commentController extends comment
}
// Remove the thumbnail file
Rhymix\Framework\Storage::deleteEmptyDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($comment_srl, 3)), true);
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($comment_srl, 3)));
// commit
$oDB->commit();
@ -1287,7 +1287,7 @@ class commentController extends comment
$oDB->commit();
// Remove the thumbnail file
Rhymix\Framework\Storage::deleteEmptyDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->comment_srl, 3)), true);
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->comment_srl, 3)));
$output->add('document_srl', $oComment->document_srl);