addRevisor() puts recheck into waiting if recheck has already begun

previously it was put into sleeping, which didn't the user/group
to do the recheck.
This commit is contained in:
Uwe Steinmann 2017-12-08 10:52:23 +01:00
parent 0a38435a2d
commit f4c25576bc

View File

@ -4547,8 +4547,12 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
$revisionID = isset($indstatus["revisionID"]) ? $indstatus["revisionID"] : NULL;
}
/* If a user is added when the revision has already been startet, then
* put it in S_LOG_WAITING already.
*/
$st=$this->getStatus();
$queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ".
"VALUES ('". $revisionID ."', '".S_LOG_SLEEPING."', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
"VALUES ('". $revisionID ."', '".($st["status"] == S_IN_REVISION ? S_LOG_WAITING : S_LOG_SLEEPING)."', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
$res = $db->getResult($queryStr);
if (is_bool($res) && !$res) {
return -1;