Code Duplication    Length = 7-7 lines in 3 locations

viewpost.php 1 location

@@ 371-377 (lines=7) @@
368
    include $GLOBALS['xoops']->path('class/pagenav.php');
369
    $nav = new XoopsPageNav($postCount, $post_perpage, $start, 'start', 'forum=' . $forum_id . '&viewmode=' . $viewmode . '&status=' . $status . '&uid=' . $uid . '&order=' . $order . '&mode=' . $mode);
370
    //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite'])) $nav->url = formatURL(Request::getString('SERVER_NAME', '', 'SERVER')) . $nav->url;
371
    if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
372
        $navi = $nav->renderSelect();
373
    } elseif ('image' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
374
        $navi = $nav->renderImageNav(4);
375
    } else {
376
        $navi = $nav->renderNav(4);
377
    }
378
379
    $xoopsTpl->assign('pagenav', $navi);
380
} else {

viewtopic.php 1 location

@@ 342-348 (lines=7) @@
339
340
    $nav = new XoopsPageNav($total_posts, $GLOBALS['xoopsModuleConfig']['posts_per_page'], $start, 'start', 'topic_id=' . $topic_id . '&order=' . $order . '&status=' . $status . '&mode=' . $mode);
341
    //if (isset($GLOBALS['xoopsModuleConfig']['do_rewrite']) && $GLOBALS['xoopsModuleConfig']['do_rewrite'] === 1) $nav->url = XOOPS_URL . $nav->url;
342
    if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
343
        $navi = $nav->renderSelect();
344
    } elseif ('image' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
345
        $navi = $nav->renderImageNav(4);
346
    } else {
347
        $navi = $nav->renderNav(4);
348
    }
349
    $xoopsTpl->assign('forum_page_nav', $navi);
350
} else {
351
    $xoopsTpl->assign('forum_page_nav', '');

viewforum.php 1 location

@@ 311-317 (lines=7) @@
308
    $page_query_nav = implode('&', array_values($query_nav));
309
    unset($query_nav);
310
    $nav = new XoopsPageNav($all_topics, $GLOBALS['xoopsModuleConfig']['topics_per_page'], $start, 'start', $page_query_nav);
311
    if ('select' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
312
        $navi = $nav->renderSelect();
313
    } elseif ('image' === $GLOBALS['xoopsModuleConfig']['pagenav_display']) {
314
        $navi = $nav->renderImageNav(4);
315
    } else {
316
        $navi = $nav->renderNav(4);
317
    }
318
319
    $xoopsTpl->assign('forum_pagenav', $navi);
320
} else {