Code Duplication    Length = 6-6 lines in 3 locations

admin/faq.php 2 locations

@@ 356-361 (lines=6) @@
353
354
        $faqid    = isset($_GET['faqid']) ? $_GET['faqid'] : -1;
355
        $answerid = isset($_GET['answerid']) ? $_GET['answerid'] : -1;
356
        if (-1 == $faqid) {
357
            $totalcategories = $categoryHandler->getCategoriesCount(-1);
358
            if (0 == $totalcategories) {
359
                redirect_header('category.php?op=mod', 3, _AM_SF_NEED_CATEGORY_FAQ);
360
            }
361
        }
362
363
        xoops_cp_header();
364
        require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
@@ 374-379 (lines=6) @@
371
        global $xoopsUser, $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts;
372
        $faqid    = isset($_GET['faqid']) ? $_GET['faqid'] : -1;
373
        $answerid = isset($_GET['answerid']) ? $_GET['answerid'] : -1;
374
        if (-1 == $faqid) {
375
            $totalcategories = $categoryHandler->getCategoriesCount(-1);
376
            if (0 == $totalcategories) {
377
                redirect_header('category.php?op=mod', 3, _AM_SF_NEED_CATEGORY_FAQ);
378
            }
379
        }
380
381
        $adminObject = \Xmf\Module\Admin::getInstance();
382
        xoops_cp_header();

admin/question.php 1 location

@@ 183-188 (lines=6) @@
180
        global $xoopsConfig, $xoopsDB, $xoopsModuleConfig, $xoopsModule, $modify, $myts;
181
        $faqid = isset($_GET['faqid']) ? $_GET['faqid'] : -1;
182
183
        if (-1 == $faqid) {
184
            $totalcategories = $categoryHandler->getCategoriesCount(-1);
185
            if (0 == $totalcategories) {
186
                redirect_header('category.php?op=mod', 3, _AM_SF_NEED_CATEGORY_QUESTION);
187
            }
188
        }
189
190
        $adminObject = \Xmf\Module\Admin::getInstance();
191
        xoops_cp_header();