mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
file is removed after cleaning up the database in _removeContent()
This commit is contained in:
parent
a0b95e8792
commit
cd061e8c2f
|
@ -1963,10 +1963,6 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
private function _removeContent($version) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
if (file_exists( $this->_dms->contentDir.$version->getPath() ))
|
||||
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() ))
|
||||
return false;
|
||||
|
||||
$db->startTransaction();
|
||||
|
||||
$status = $version->getStatus();
|
||||
|
@ -2080,6 +2076,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
return false;
|
||||
}
|
||||
|
||||
if (file_exists( $this->_dms->contentDir.$version->getPath() ))
|
||||
if (!SeedDMS_Core_File::removeFile( $this->_dms->contentDir.$version->getPath() )) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->commitTransaction();
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user