Code Duplication    Length = 7-7 lines in 2 locations

admin/groupperm.php 1 location

@@ 76-82 (lines=7) @@
73
    $opform->addElement($opSelect);
74
    $opform->display();
75
76
    foreach (array_keys($cats) as $i) {
77
        $cid     = $cats[$i]->getVar('cid');
78
        $title   = $cats[$i]->getVar('title');
79
        $pid     = $cats[$i]->getVar('pid');
80
        $allcats = $cattree->alumni_makeArrayTree($cats[$i]->getVar('cid'));
81
        $form->addItem($cid, $title, $pid);
82
    }
83
    $form->display();
84
}
85

admin/permissions.php 1 location

@@ 83-89 (lines=7) @@
80
    $moduleId = $xoops->module->getVar('mid');
81
    $form     = new Xoops\Form\GroupPermissionForm($title_of_form, $moduleId, $perm_name, $perm_desc, 'admin/permissions.php', $anonymous);
82
83
    foreach (array_keys($cats) as $i) {
84
        $cid     = $cats[$i]->getVar('cid');
85
        $title   = $cats[$i]->getVar('title');
86
        $pid     = $cats[$i]->getVar('pid');
87
        $allcats = $cattree->alumni_makeArrayTree($cats[$i]->getVar('cid'));
88
        $form->addItem($cid, $title, $pid);
89
    }
90
    $form->display();
91
}
92
$xoops->footer();