Code Duplication    Length = 14-14 lines in 3 locations

dashboard/application/models/computing-support/Address_book_Model.php 1 location

@@ 39-52 (lines=14) @@
36
        return $return;
37
    }
38
39
    function get_department() {
40
        if (!isset($_GET['cat'])) {
41
            $_GET['cat'] = '1';
42
        }
43
        $result = $this->db->get_where('facultysub', array('cat_id' => $_GET['cat']));
44
        $return = array();
45
        if ($result->num_rows() > 0) {
46
            foreach ($result->result_array() as $row) {
47
                $return[$row['cat_key']] = $row['subfaculty'];
48
            }
49
        }
50
51
        return $return;
52
    }
53
    
54
    function get_faculty_from_number($faculty) {
55
        

dashboard/application/models/computing-support/New_account_model.php 1 location

@@ 106-119 (lines=14) @@
103
        return $return;
104
    }
105
106
    function get_department() {
107
        if (!isset($_GET['cat'])) {
108
            $_GET['cat'] = '1';
109
        }
110
        $result = $this->db->get_where('facultysub', array('cat_id' => $_GET['cat']));
111
        $return = array();
112
        if ($result->num_rows() > 0) {
113
            foreach ($result->result_array() as $row) {
114
                $return[$row['cat_key']] = $row['subfaculty'];
115
            }
116
        }
117
118
        return $return;
119
    }
120
121
    public function complete_account() {
122

dashboard/application/models/computing-support/Temporary_account_model.php 1 location

@@ 108-121 (lines=14) @@
105
        return $return;
106
    }
107
108
    function get_department() {
109
        if (!isset($_GET['cat'])) {
110
            $_GET['cat'] = '1';
111
        }
112
        $result = $this->db->get_where('facultysub', array('cat_id' => $_GET['cat']));
113
        $return = array();
114
        if ($result->num_rows() > 0) {
115
            foreach ($result->result_array() as $row) {
116
                $return[$row['cat_key']] = $row['subfaculty'];
117
            }
118
        }
119
120
        return $return;
121
    }
122
    
123
    public function get_pending() {
124
        $this->db->where('status', '0');