Fix broken endpoint for enabling comments
authorMarcel Werk <burntime@woltlab.com>
Fri, 27 Dec 2024 12:23:49 +0000 (13:23 +0100)
committerMarcel Werk <burntime@woltlab.com>
Fri, 27 Dec 2024 12:23:49 +0000 (13:23 +0100)
wcfsetup/install/files/lib/system/endpoint/controller/core/comments/EnableComment.class.php
wcfsetup/install/files/lib/system/endpoint/controller/core/comments/responses/EnableResponse.class.php

index 93d49567ce04e2d875490c7d852a803ba0304cc1..9f4cf92cca1fe66654342cf11a06bbe705027458 100644 (file)
@@ -30,7 +30,7 @@ final class EnableComment implements IController
 
         $this->assertCommentCanBeEnabled($comment);
 
-        if (!$comment->isDisabled) {
+        if ($comment->isDisabled) {
             (new \wcf\system\comment\command\PublishComment($comment))();
         }
 
index 3ac3676dfc94a3d2447ab2d9c433bfdb37901e4f..1810c9af34d21bf312415fd3cb1f6553b0e48b3d 100644 (file)
@@ -30,7 +30,7 @@ final class EnableResponse implements IController
 
         $this->assertResponseCanBeEnabled($response);
 
-        if (!$response->isDisabled) {
+        if ($response->isDisabled) {
             (new \wcf\system\comment\response\command\PublishResponse($response))();
         }