Code Duplication    Length = 4-4 lines in 2 locations

src/Pages/Forum.php 2 locations

@@ 950-953 (lines=4) @@
947
        }
948
949
        // Replying to existing thread
950
        if (!$addMode && !$post && $thread && !$thread->canPost()) {
951
            Security::permissionFailure($this, $messageSet);
952
            return false;
953
        }
954
955
        // Editing existing post
956
        if (!$addMode && $post && !$post->canEdit()) {
@@ 1099-1102 (lines=4) @@
1096
        }
1097
1098
        // Replying to existing thread
1099
        if ($thread && !$post && !$thread->canPost()) {
1100
            Security::permissionFailure($this, $messageSet);
1101
            return false;
1102
        }
1103
1104
        // Editing existing post
1105
        if ($thread && $post && !$post->canEdit()) {