mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
Fix #1901 always delete thumbnail directory when deleting document or comment
This commit is contained in:
parent
933175971e
commit
418c2b9dfa
2 changed files with 6 additions and 5 deletions
|
|
@ -1179,7 +1179,7 @@ class commentController extends comment
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the thumbnail file
|
// 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
|
// commit
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
@ -1287,7 +1287,7 @@ class commentController extends comment
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
// Remove the thumbnail file
|
// 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);
|
$output->add('document_srl', $oComment->document_srl);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1023,7 +1023,7 @@ class documentController extends document
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
||||||
// Remove the thumbnail file
|
// Remove the thumbnail file
|
||||||
FileHandler::removeDir(sprintf('files/thumbnails/%s',getNumberingPath($obj->document_srl, 3)));
|
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->document_srl, 3)));
|
||||||
|
|
||||||
$output->add('document_srl',$obj->document_srl);
|
$output->add('document_srl',$obj->document_srl);
|
||||||
|
|
||||||
|
|
@ -1149,7 +1149,7 @@ class documentController extends document
|
||||||
$this->_deleteDocumentUpdateLog($args);
|
$this->_deleteDocumentUpdateLog($args);
|
||||||
|
|
||||||
// Remove the thumbnail file
|
// Remove the thumbnail file
|
||||||
Rhymix\Framework\Storage::deleteEmptyDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($document_srl, 3)), true);
|
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($document_srl, 3)));
|
||||||
|
|
||||||
// commit
|
// commit
|
||||||
$oDB->commit();
|
$oDB->commit();
|
||||||
|
|
@ -1292,7 +1292,8 @@ class documentController extends document
|
||||||
if($oDocument->get('category_srl')) $this->updateCategoryCount($oDocument->get('module_srl'),$oDocument->get('category_srl'));
|
if($oDocument->get('category_srl')) $this->updateCategoryCount($oDocument->get('module_srl'),$oDocument->get('category_srl'));
|
||||||
|
|
||||||
// remove thumbnails
|
// remove thumbnails
|
||||||
FileHandler::removeDir(sprintf('files/thumbnails/%s',getNumberingPath($obj->document_srl, 3)));
|
Rhymix\Framework\Storage::deleteDirectory(RX_BASEDIR . sprintf('files/thumbnails/%s', getNumberingPath($obj->document_srl, 3)));
|
||||||
|
|
||||||
// Set the attachment to be invalid state
|
// Set the attachment to be invalid state
|
||||||
if($oDocument->hasUploadedFiles())
|
if($oDocument->hasUploadedFiles())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue