Code Duplication    Length = 4-4 lines in 2 locations

code/pagetypes/Forum.php 2 locations

@@ 859-862 (lines=4) @@
856
        }
857
858
        // Replying to existing thread
859
        if (!$addMode && !$post && $thread && !$thread->canPost()) {
860
            Security::permissionFailure($this, $messageSet);
861
            return false;
862
        }
863
864
        // Editing existing post
865
        if (!$addMode && $post && !$post->canEdit()) {
@@ 1002-1005 (lines=4) @@
999
        }
1000
1001
        // Replying to existing thread
1002
        if ($thread && !$post && !$thread->canPost()) {
1003
            Security::permissionFailure($this, $messageSet);
1004
            return false;
1005
        }
1006
1007
        // Editing existing post
1008
        if ($thread && $post && !$post->canEdit()) {