Code Duplication    Length = 5-5 lines in 2 locations

delete.php 1 location

@@ 45-49 (lines=5) @@
42
    $topic = $topicHandler->get($topic_id);
43
}
44
$topic_id = $topic->getVar('topic_id');
45
if (!$topic_id) {
46
    $redirect = empty($forum) ? 'index.php' : 'viewforum.php?forum=' . $forum;
47
    $redirect = XOOPS_URL . '/modules/newbb/' . $redirect;
48
    redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC);
49
}
50
51
$forum     = $topic->getVar('forum_id');
52
$forumObject = $forumHandler->get($forum);

topicmanager.php 1 location

@@ 52-56 (lines=5) @@
49
    }
50
}
51
52
if (empty($topic_id)) {
53
    $redirect = empty($forum_id) ? 'index.php' : 'viewforum.php?forum={$forum}';
54
    $redirect = XOOPS_URL . '/modules/newbb/' . $redirect;
55
    redirect_header($redirect, 2, _MD_NEWBB_ERRORTOPIC);
56
}
57
58
///** @var \NewbbTopicHandler $topicHandler */
59
//$topicHandler = xoops_getModuleHandler('topic', 'newbb');