replace sql statement by function in SeedDMS_Core_Document

This commit is contained in:
Uwe Steinmann 2017-07-20 18:21:24 +02:00
parent bbad479580
commit a846bcf633

View File

@ -164,9 +164,7 @@ if (count($receiptIndex["i"]) > 0) {
if (!isset($accessIndex["i"][$rx])) {
// User does not have any receipt privileges for this document
// revision or does not exist.
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ".
"VALUES ('". $receiptStatus[$rv["idx"]]["receiptID"] ."', '".S_LOG_USER_REMOVED."', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')";
$res = $db->getResult($queryStr);
$res = $content->delIndRecipient($dms->getUser($rx), $user, getMLText("removed_recipient"));
}
else {
$res = $content->delIndRecipient($accessIndex["i"][$rx], $user);
@ -270,9 +268,7 @@ if (count($receiptIndex["g"]) > 0) {
if (!isset($accessIndex["g"][$rx])) {
// Group does not have any receipt privileges for this document
// revision or does not exist.
$queryStr = "INSERT INTO `tblDocumentReceiptLog` (`receiptID`, `status`, `comment`, `date`, `userID`) ".
"VALUES ('". $receiptStatus[$rv["idx"]]["receiptID"] ."', '".S_LOG_USER_REMOVED."', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')";
$res = $db->getResult($queryStr);
$res = $content->delGrpRecipient($dms->getGroup($rx), $user, getMLText("removed_recipient"));
}
else {
$res = $content->delGrpRecipient($accessIndex["g"][$rx], $user);