Code Duplication    Length = 20-20 lines in 3 locations

dashboard/application/controllers/computing-support/Status.php 2 locations

@@ 37-56 (lines=20) @@
34
        $this->load->view('computing-support/status/auto', $data);
35
    }
36
37
    public function reset() {
38
39
        if (in_array('CN=Dashboard_Admin,OU=Dashboard_Group,OU=Intranet_Group,OU=Groups,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
40
41
            if (isset($_GET['sid'])) {
42
43
                $sid = $_GET['sid'];
44
                $this->status_model->reset($sid);
45
                
46
                $function = 'reset_status_monitor_'.$sid;
47
                $this->user_model->function_log($function);
48
49
                redirect($_SERVER['HTTP_REFERER']);
50
            }
51
52
            redirect($_SERVER['HTTP_REFERER']);
53
        } else {
54
            redirect($_SERVER['HTTP_REFERER']);
55
        }
56
    }
57
58
    public function delete() {
59
@@ 58-77 (lines=20) @@
55
        }
56
    }
57
58
    public function delete() {
59
60
        if (in_array('CN=Dashboard_Admin,OU=Dashboard_Group,OU=Intranet_Group,OU=Groups,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
61
62
            if (isset($_GET['sid'])) {
63
64
                $sid = $_GET['sid'];
65
                $this->status_model->delete($sid);
66
                
67
                $function = 'delete_status_monitor_'.$sid;
68
                $this->user_model->function_log($function);
69
70
                redirect('computing-support/status');
71
            }
72
73
            redirect($_SERVER['HTTP_REFERER']);
74
        } else {
75
            redirect($_SERVER['HTTP_REFERER']);
76
        }
77
    }
78
79
    public function edit() {
80

dashboard/application/controllers/computing-support/Temporary_account.php 1 location

@@ 137-156 (lines=20) @@
134
        }
135
    }
136
    
137
    public function reject() {
138
139
        if (in_array('CN=DG06,OU=Distribution Groups,OU=Email Groups,OU=Accounts,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
140
141
            if (isset($_GET['id'])) {
142
143
                $id = $_GET['id'];
144
                $this->temporary_account_model->reject($id);
145
146
                $function = 'temp_account_REJECT_' . $id;
147
                $this->user_model->function_log($function);
148
149
                redirect($_SERVER['HTTP_REFERER']);
150
            }
151
152
            redirect($_SERVER['HTTP_REFERER']);
153
        } else {
154
            redirect($_SERVER['HTTP_REFERER']);
155
        }
156
    }
157
158
    public function approve() {
159