Code Duplication    Length = 10-11 lines in 2 locations

admin/admin.php 1 location

@@ 49-59 (lines=11) @@
46
47
$admintest = 0;
48
49
if (is_object($xoopsUser)) {
50
    $xoopsModule =& XoopsModule::getByDirname("system");
51
    if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
52
        redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
53
        exit();
54
    }
55
    $admintest=1;
56
} else {
57
    redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
58
    exit();
59
}
60
61
// include system category definitions
62
include_once XOOPS_ROOT_PATH."/modules/system/constants.php";

admin/functions.php 1 location

@@ 11-20 (lines=10) @@
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
        exit();
16
    }
17
} else {
18
    redirect_header(XOOPS_URL."/",1,_NOPERM);
19
    exit();
20
}
21
/**
22
 * Function used to display an horizontal menu inside the admin panel
23
 * Enable webmasters to navigate thru the module's features.