Code Duplication    Length = 8-9 lines in 2 locations

admin/admin.php 1 location

@@ 40-48 (lines=9) @@
37
38
$admintest = 0;
39
40
if (is_object($xoopsUser)) {
41
    $xoopsModule = XoopsModule::getByDirname('system');
42
    if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
43
        redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
44
    }
45
    $admintest = 1;
46
} else {
47
    redirect_header(XOOPS_URL . '/user.php', 3, _NOPERM);
48
}
49
50
// include system category definitions
51
include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';

admin/functions.php 1 location

@@ 11-18 (lines=8) @@
8
 * Licence: GNU
9
 */
10
11
if (is_object($xoopsUser)) {
12
    $xoopsModule = XoopsModule::getByDirname('lexikon');
13
    if (!$xoopsUser->isAdmin($xoopsModule->mid())) {
14
        redirect_header(XOOPS_URL . '/', 1, _NOPERM);
15
    }
16
} else {
17
    redirect_header(XOOPS_URL . '/', 1, _NOPERM);
18
}
19
/**
20
 * Function used to display an horizontal menu inside the admin panel
21
 * Enable webmasters to navigate thru the module's features.