Code Duplication    Length = 5-6 lines in 4 locations

admin/category.php 2 locations

@@ 60-65 (lines=6) @@
57
        $categoryTempArray = $categoryHandler->getAll($criteria);
58
59
        // Display Page Navigation
60
        if ($categoryTempRows > $categoryPaginationLimit) {
61
            require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
62
63
            $pagenav = new \XoopsPageNav($categoryTempRows, $categoryPaginationLimit, $start, 'start', 'op=list' . '&sort=' . $sort . '&order=' . $order . '');
64
            $GLOBALS['xoopsTpl']->assign('pagenav', null === $pagenav ? $pagenav->renderNav() : '');
65
        }
66
67
        $GLOBALS['xoopsTpl']->assign('categoryRows', $categoryTempRows);
68
        $categoryArray = [];
@@ 128-132 (lines=5) @@
125
            }
126
            unset($categoryTempArray);
127
            // Display Navigation
128
            if ($categoryCount > $categoryPaginationLimit) {
129
                require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
130
                $pagenav = new \XoopsPageNav($categoryCount, $categoryPaginationLimit, $start, 'start', 'op=list' . '&sort=' . $sort . '&order=' . $order . '');
131
                $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
132
            }
133
134
            echo $GLOBALS['xoopsTpl']->fetch(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/templates/admin/randomquote_admin_category.tpl');
135
        }

admin/quotes.php 2 locations

@@ 60-65 (lines=6) @@
57
        $quotesTempArray = $quotesHandler->getAll($criteria);
58
59
        // Display Page Navigation
60
        if ($quotesTempRows > $quotesPaginationLimit) {
61
            require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
62
63
            $pagenav = new \XoopsPageNav($quotesTempRows, $quotesPaginationLimit, $start, 'start', 'op=list' . '&sort=' . $sort . '&order=' . $order . '');
64
            $GLOBALS['xoopsTpl']->assign('pagenav', null === $pagenav ? $pagenav->renderNav() : '');
65
        }
66
67
        $GLOBALS['xoopsTpl']->assign('quotesRows', $quotesTempRows);
68
        $quotesArray = [];
@@ 120-124 (lines=5) @@
117
            }
118
            unset($quotesTempArray);
119
            // Display Navigation
120
            if ($quotesCount > $quotesPaginationLimit) {
121
                require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
122
                $pagenav = new \XoopsPageNav($quotesCount, $quotesPaginationLimit, $start, 'start', 'op=list' . '&sort=' . $sort . '&order=' . $order . '');
123
                $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
124
            }
125
126
            echo $GLOBALS['xoopsTpl']->fetch(XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname') . '/templates/admin/randomquote_admin_quotes.tpl');
127
        }