Code Duplication    Length = 5-5 lines in 2 locations

admin/department.php 2 locations

@@ 236-240 (lines=5) @@
233
            //Department Name unique?
234
            $crit = new CriteriaCompo(new Criteria('department', $_POST['newDept']));
235
            $crit->add(new Criteria('id', $deptID, '!='));
236
            if($existingDepts = $hDepartments->getCount($crit)){
237
                $hasErrors = true;
238
                $errors['newDept'][] = _XHELP_MESSAGE_DEPT_EXISTS;
239
240
            }
241
        }
242
243
        if ($hasErrors) {
@@ 714-718 (lines=5) @@
711
712
            //Department Name unique?
713
            $crit = new Criteria('department', $_POST['newDept']);
714
            if($existingDepts = $hDepartments->getCount($crit)){
715
                $hasErrors = true;
716
                $errors['newDept'][] = _XHELP_MESSAGE_DEPT_EXISTS;
717
718
            }
719
        }
720
721
        if ($hasErrors) {