Code Duplication    Length = 4-5 lines in 2 locations

addTicket.php 1 location

@@ 67-71 (lines=5) @@
64
        $aDept = array();
65
        $myGroups =& $hMember->getGroupsByUser($xoopsUser->getVar('uid'));
66
        if(($xhelp_isStaff) && ($xoopsModuleConfig['xhelp_deptVisibility'] == 0)){     // If staff are not applied
67
            foreach($departments as $dept){
68
                $deptid = $dept->getVar('id');
69
                $aDept[] = array('id'=>$deptid,
70
                                 'department'=>$dept->getVar('department'));
71
            }
72
        } else {
73
            foreach($departments as $dept){
74
                $deptid = $dept->getVar('id');

ticket.php 1 location

@@ 310-313 (lines=4) @@
307
            $departments =& $hDepartments->getObjects($crit);
308
            $hStaff =& xhelpGetHandler('staff');
309
310
            foreach($departments as $dept){
311
                $aDept[] = array('id'=>$dept->getVar('id'),
312
                                 'department'=>$dept->getVar('department'));
313
            }
314
315
            // Form validation stuff
316
            $errors = array();