Code Duplication    Length = 7-7 lines in 3 locations

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 {

viewpost.php 1 location

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

viewtopic.php 1 location

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