From 502e9b6271a2af9c5c25c60eacd62a1133a9aa96 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 8 Dec 2015 18:15:44 +0100 Subject: [PATCH] remove old sql code, use constant S_LOG_USER_REMOVED --- op/op.SetRevisors.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/op/op.SetRevisors.php b/op/op.SetRevisors.php index 395c9a7c2..8c5209c09 100644 --- a/op/op.SetRevisors.php +++ b/op/op.SetRevisors.php @@ -85,7 +85,7 @@ $revisionStatus = $content->getRevisionStatus(); // Index the revision results for easy cross-reference with the Approvers List. $revisionIndex = array("i"=>array(), "g"=>array()); foreach ($revisionStatus as $i=>$rs) { - if ($rs["status"]!=-2) { + if ($rs["status"]!=S_LOG_USER_REMOVED) { if ($rs["type"]==0) { $revisionIndex["i"][$rs["required"]] = array("status"=>$rs["status"], "idx"=>$i); } @@ -161,11 +161,6 @@ if (count($revisionIndex["i"]) > 0) { if (!isset($accessIndex["i"][$rx])) { // User does not have any revision privileges for this document // revision or does not exist. - /* Take this out for now - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; - $res = $db->getResult($queryStr); - */ $res = $content->delIndRevisor($dms->getUser($rx), $user, getMLText("removed_recipient")); } else { @@ -268,11 +263,6 @@ if (count($revisionIndex["g"]) > 0) { if (!isset($accessIndex["g"][$rx])) { // Group does not have any revision privileges for this document // revision or does not exist. - /* - $queryStr = "INSERT INTO `tblDocumentRevisionLog` (`revisionID`, `status`, `comment`, `date`, `userID`) ". - "VALUES ('". $revisionStatus[$rv["idx"]]["revisionID"] ."', '-2', '".getMLText("removed_recipient")."', NOW(), '". $user->getID() ."')"; - $res = $db->getResult($queryStr); -*/ $res = $content->delGrpRevisor($dms->getGroup($rx), $user, getMLText("removed_recipient")); } else {