Code Duplication    Length = 3-3 lines in 2 locations

request.php 1 location

@@ 30-32 (lines=3) @@
27
// Find if the user is admin of the module
28
$isAdmin = sf_userIsAdmin();
29
// If the user is not admin AND we don't allow user submission, exit
30
if (!($isAdmin || (isset($xoopsModuleConfig['allowrequest']) && $xoopsModuleConfig['allowrequest'] == 1 && (is_object($xoopsUser) || (isset($xoopsModuleConfig['anonpost']) && $xoopsModuleConfig['anonpost'] == 1))))) {
31
    redirect_header('index.php', 1, _NOPERM);
32
}
33
34
$op = '';
35

submit.php 1 location

@@ 32-34 (lines=3) @@
29
// Find if the user is admin of the module
30
$isAdmin = sf_userIsAdmin();
31
// If the user is not admin AND we don't allow user submission, exit
32
if (!($isAdmin || (isset($xoopsModuleConfig['allowsubmit']) && $xoopsModuleConfig['allowsubmit'] == 1 && (is_object($xoopsUser) || (isset($xoopsModuleConfig['anonpost']) && $xoopsModuleConfig['anonpost'] == 1))))) {
33
    redirect_header('index.php', 1, _NOPERM);
34
}
35
36
$op = 'form';
37