clean workflow log if document version is deleted

This commit is contained in:
Uwe Steinmann 2015-03-27 17:15:21 +01:00
parent d2f4c24f08
commit 57520f27cf

View File

@ -1486,6 +1486,12 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
return false;
}
$queryStr = "DELETE FROM `tblWorkflowLog` WHERE `document` = '". $this->getID() ."' AND `version` = '" . $version->_version."'";
if (!$db->getResult($queryStr)) {
$db->rollbackTransaction();
return false;
}
$db->commitTransaction();
return true;
} /* }}} */