Code Duplication    Length = 3-5 lines in 2 locations

htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2 locations

@@ 423-425 (lines=3) @@
420
                }
421
            }
422
            $groups = array(XOOPS_GROUP_ADMIN);
423
            if ($module->getInfo('hasMain')) {
424
                $groups = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS);
425
            }
426
            // retrieve all block ids for this module
427
            $blocks        = XoopsBlock::getByModule($newmid, false);
428
            $msgs[]        = _AM_SYSTEM_MODULES_GROUP_SETTINGS_ADD;
@@ 1004-1008 (lines=5) @@
1001
                            if (empty($newbid)) {
1002
                                $newbid = $xoopsDB->getInsertId();
1003
                            }
1004
                            if ($module->getInfo('hasMain')) {
1005
                                $groups = array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS);
1006
                            } else {
1007
                                $groups = array(XOOPS_GROUP_ADMIN);
1008
                            }
1009
                            $gperm_handler = xoops_getHandler('groupperm');
1010
                            foreach ($groups as $mygroup) {
1011
                                $bperm = $gperm_handler->create();