Code Duplication    Length = 3-3 lines in 5 locations

xoops_trust_path/libs/altsys/class/MyBlocksAdmin.class.php 1 location

@@ 78-80 (lines=3) @@
75
    $module_handler = xoops_gethandler('module') ;
76
    $module =& $module_handler->getByDirname('altsys') ;
77
    $moduleperm_handler = xoops_gethandler('groupperm') ;
78
    if (! is_object(@$GLOBALS['xoopsUser']) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $GLOBALS['xoopsUser']->getGroups())) {
79
        die('only admin of altsys can access this area') ;
80
    }
81
}
82
83

xoops_trust_path/libs/altsys/include/mygroupperm.php 1 location

@@ 39-41 (lines=3) @@
36
        }
37
    }
38
    $moduleperm_handler = xoops_gethandler('groupperm') ;
39
    if (! is_object(@$GLOBALS['xoopsUser']) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $GLOBALS['xoopsUser']->getGroups())) {
40
        die('only admin of altsys can access this area') ;
41
    }
42
} else {
43
    // check the permission of 'module_admin' of the module
44
    if ($modid <= 0 || !is_object($GLOBALS['xoopsUser']) || !$GLOBALS['xoopsUser']->isAdmin($modid)) {

xoops_trust_path/libs/altsys/mylangadmin.php 1 location

@@ 22-24 (lines=3) @@
19
    die('install altsys') ;
20
}
21
$moduleperm_handler = xoops_gethandler('groupperm') ;
22
if (! is_object(@$xoopsUser) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) {
23
    die('only admin of altsys can access this area') ;
24
}
25
26
27
// initials

xoops_trust_path/libs/altsys/mytplsadmin.php 1 location

@@ 21-23 (lines=3) @@
18
    die('install altsys') ;
19
}
20
$moduleperm_handler = xoops_gethandler('groupperm') ;
21
if (! is_object(@$xoopsUser) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) {
22
    die('only admin of altsys can access this area') ;
23
}
24
25
26
// initials

xoops_trust_path/libs/altsys/mytplsform.php 1 location

@@ 21-23 (lines=3) @@
18
$module_handler = xoops_gethandler('module') ;
19
$module =& $module_handler->getByDirname('altsys') ;
20
$moduleperm_handler = xoops_gethandler('groupperm') ;
21
if (! is_object(@$xoopsUser) || ! $moduleperm_handler->checkRight('module_admin', $module->getVar('mid'), $xoopsUser->getGroups())) {
22
    die('only admin of altsys can access this area') ;
23
}
24
25
//$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ;
26