Code Duplication    Length = 4-4 lines in 2 locations

viewtopic.php 2 locations

@@ 74-77 (lines=4) @@
71
    }
72
}
73
74
if (!$topic_id && !$post_id) {
75
    $redirect = empty($forum_id) ? XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php' : XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/viewforum.php?forum={$forum_id}";
76
    redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC);
77
}
78
79
///** @var Newbb\TopicHandler $topicHandler */
80
//$topicHandler = Newbb\Helper::getInstance()->getHandler('Topic');
@@ 91-94 (lines=4) @@
88
    $topicObject = $topicHandler->get($topic_id);
89
}
90
91
if (!is_object($topicObject) || !$topic_id = $topicObject->getVar('topic_id')) {
92
    $redirect = empty($forum_id) ? XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/index.php' : XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . "/viewforum.php?forum={$forum_id}";
93
    redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC);
94
}
95
$forum_id = $topicObject->getVar('forum_id');
96
///** @var Newbb\ForumHandler $forumHandler */
97
//$forumHandler = Newbb\Helper::getInstance()->getHandler('Forum');