Code Duplication    Length = 7-7 lines in 2 locations

admin/department.php 2 locations

@@ 336-342 (lines=7) @@
333
            $aPerms[$perm->getVar('gperm_groupid')] = $perm->getVar('gperm_groupid');
334
        }
335
336
        if (! $sess_dept === false) {
337
            $fld_newDept = $sess_dept['newDept'];
338
            $fld_groups  = $sess_dept['groups'];
339
        } else {
340
            $fld_newDept = $dept->getVar('department');
341
            $fld_groups = $aPerms;
342
        }
343
344
        // Get list of all groups
345
        $crit = new Criteria('', '');
@@ 834-840 (lines=7) @@
831
            xhelpRenderErrors($sess_errors, xhelpMakeURI(XHELP_ADMIN_URL.'/department.php', array('op'=>'clearAddSession'), false));
832
        }
833
834
        if (! $sess_dept === false) {
835
            $fld_newDept = $sess_dept['newDept'];
836
            $fld_groups  = $sess_dept['groups'];
837
        } else {
838
            $fld_newDept = '';
839
            $fld_groups = array();
840
        }
841
842
        echo "<form method='post' action='".XHELP_ADMIN_URL."/department.php?op=manageDepartments'>";
843
        echo "<table width='100%' cellspacing='1' class='outer'>