mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
replace sql statement by function in SeedDMS_Core_Document
This commit is contained in:
parent
bbad479580
commit
a846bcf633
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user