do not access SeedDMS_Core_DocumentContent::_version anymore

This commit is contained in:
Uwe Steinmann 2019-09-10 17:15:27 +02:00
parent 68e97f81ce
commit 9bc5b73771

View File

@ -2181,7 +2181,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
return false;
}
$queryStr = "DELETE FROM `tblTransmittalItems` WHERE `document` = '". $this->getID() ."' AND `version` = '" . $version->_version."'";
$queryStr = "DELETE FROM `tblTransmittalItems` WHERE `document` = '". $this->getID() ."' AND `version` = '" . $version->getVersion()."'";
if (!$db->getResult($queryStr)) {
$db->rollbackTransaction();
return false;
@ -2262,7 +2262,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
* This implmentation is different from the above for removing approvals
* and reviews. It doesn't use getReceiptStatus() but reads the database
*/
$queryStr = "SELECT * FROM `tblDocumentRecipients` WHERE `documentID` = '". $this->getID() ."' AND `version` = '" . $version->_version."'";
$queryStr = "SELECT * FROM `tblDocumentRecipients` WHERE `documentID` = '". $this->getID() ."' AND `version` = '" . $version->getVersion()."'";
$resArr = $db->getResultArray($queryStr);
if ((is_bool($resArr) && !$resArr)) {
$db->rollbackTransaction();
@ -2291,7 +2291,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
* This implementation is different from the above for removing approvals
* and reviews. It doesn't use getRevisionStatus() but reads the database
*/
$queryStr = "SELECT * FROM `tblDocumentRevisors` WHERE `documentID` = '". $this->getID() ."' AND `version` = '" . $version->_version."'";
$queryStr = "SELECT * FROM `tblDocumentRevisors` WHERE `documentID` = '". $this->getID() ."' AND `version` = '" . $version->getVersion()."'";
$resArr = $db->getResultArray($queryStr);
if ((is_bool($resArr) && !$resArr)) {
$db->rollbackTransaction();