propperly check return value after removing log entry

This commit is contained in:
Uwe Steinmann 2021-09-29 17:27:00 +02:00
parent 7a4e0e8513
commit 6d92be55fb
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ if($approveStatus['type'] == 0) {
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("invalid_approveid"));
$comment = $_POST["comment"];
if(0 == $latestContent->removeApproval($approveid, $user, $comment)) {
if(true === $latestContent->removeApproval($approveid, $user, $comment)) {
$latestContent->verifyStatus(true, $user, $msg);
}
header("Location:../out/out.ViewDocument.php?documentid=".$documentid."&currenttab=revapp");

View File

@ -94,7 +94,7 @@ if($reviewStatus['type'] == 0) {
$comment = $_POST["comment"];
$overallStatus = $latestContent->getStatus();
if(0 == $latestContent->removeReview($reviewid, $user, $comment)) {
if(true === $latestContent->removeReview($reviewid, $user, $comment)) {
$latestContent->verifyStatus(true, $user, $msg);
if($notifier) {
$notifier->sendReviewRequestMail($latestContent, $user);