Code Duplication    Length = 4-4 lines in 2 locations

code/pagetypes/Forum.php 2 locations

@@ 891-894 (lines=4) @@
888
        }
889
890
        // Replying to existing thread
891
        if (!$addMode && !$post && $thread && !$thread->canPost()) {
892
            Security::permissionFailure($this, $messageSet);
893
            return false;
894
        }
895
896
        // Editing existing post
897
        if (!$addMode && $post && !$post->canEdit()) {
@@ 1040-1043 (lines=4) @@
1037
        }
1038
1039
        // Replying to existing thread
1040
        if ($thread && !$post && !$thread->canPost()) {
1041
            Security::permissionFailure($this, $messageSet);
1042
            return false;
1043
        }
1044
1045
        // Editing existing post
1046
        if ($thread && $post && !$post->canEdit()) {