Code Duplication    Length = 4-4 lines in 2 locations

viewpost.php 1 location

@@ 277-280 (lines=4) @@
274
    if ($isAdmin || $post->checkIdentity()) {
275
        $post_text       = $post->getVar('post_text');
276
        $post_attachment = $post->displayAttachment();
277
    } elseif ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post->getVar('post_karma') > $user_karma) {
278
        $post_text       = "<div class='karma'>" . sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $post->getVar('post_karma')) . '</div>';
279
        $post_attachment = '';
280
    } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post->getVar('require_reply')) {
281
        $post_text       = "<div class='karma'>" . _MD_NEWBB_REPLY_REQUIREMENT . '</div>';
282
        $post_attachment = '';
283
    } else {

class/post.php 1 location

@@ 515-518 (lines=4) @@
512
        if ($isAdmin || $this->checkIdentity()) {
513
            $post_text       = $this->getVar('post_text');
514
            $post_attachment = $this->displayAttachment();
515
        } elseif ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $this->getVar('post_karma') > $user_karma) {
516
            $post_text       = "<div class='karma'>" . sprintf(_MD_NEWBB_KARMA_REQUIREMENT, $user_karma, $this->getVar('post_karma')) . '</div>';
517
            $post_attachment = '';
518
        } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $this->getVar('require_reply')
519
                  && (!$uid || !in_array($uid, $viewtopic_posters))) {
520
            $post_text       = "<div class='karma'>" . _MD_NEWBB_REPLY_REQUIREMENT . '</div>';
521
            $post_attachment = '';