mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +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) { /* {{{ */
|
private function _removeContent($version) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$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();
|
$db->startTransaction();
|
||||||
|
|
||||||
$status = $version->getStatus();
|
$status = $version->getStatus();
|
||||||
|
@ -2080,6 +2076,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return false;
|
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();
|
$db->commitTransaction();
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user