fix setReceiptByGrp()

This commit is contained in:
Uwe Steinmann 2016-10-05 12:39:16 +02:00
parent 7597cb1c74
commit bbc6376bcf

View File

@ -4328,18 +4328,19 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
// Return an error.
return -3;
}
if ($receiptStatus[0]["status"]==-2) {
$grpstatus = array_pop($receiptStatus["status"]);
if ($grpstatus["status"] == S_LOG_USER_REMOVED) {
// Group has been deleted from recipients
return -4;
}
// Check if the status is really different from the current status
if ($receiptStatus[0]["status"] == $status)
if ($grpstatus["status"] == $status)
return 0;
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`recipientsID`, `status`,
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`,
`comment`, `date`, `userID`) ".
"VALUES ('". $receiptStatus[0]["recipientsID"] ."', '".
"VALUES ('". $grpstatus["receiptID"] ."', '".
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
$requestUser->getID() ."')";
$res=$db->getResult($queryStr);