Code Duplication    Length = 14-14 lines in 6 locations

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

@@ 75-88 (lines=14) @@
72
        }
73
    }
74
75
    public function history() {
76
77
        if (in_array('CN=DG06,OU=Distribution Groups,OU=Email Groups,OU=Accounts,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
78
79
            $data = array();
80
            $data['ownership'] = $this->ownership_model->get_all_ownership();
81
82
            $this->load->view('templates/header');
83
            $this->load->view('computing-support/ownership/history', $data);
84
            $this->load->view('templates/footer');
85
        } else {
86
            redirect('permissions');
87
        }
88
    }
89
90
    public function review() {
91
@@ 90-103 (lines=14) @@
87
        }
88
    }
89
90
    public function review() {
91
92
        if (in_array('CN=Dashboard_Admin,OU=Dashboard_Group,OU=Intranet_Group,OU=Groups,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
93
94
            $data = array();
95
            $data['ownership'] = $this->ownership_model->get_pending_ownership();
96
97
            $this->load->view('templates/header');
98
            $this->load->view('computing-support/ownership/review', $data);
99
            $this->load->view('templates/footer');
100
        } else {
101
            redirect('permissions');
102
        }
103
    }
104
105
    public function check() {
106

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

@@ 98-111 (lines=14) @@
95
        }
96
    }
97
98
    public function history() {
99
100
        if (in_array('CN=DG06,OU=Distribution Groups,OU=Email Groups,OU=Accounts,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
101
102
            $data = array();
103
            $data['private_drive'] = $this->private_drive_model->get_all();
104
105
            $this->load->view('templates/header');
106
            $this->load->view('computing-support/private-drive/history', $data);
107
            $this->load->view('templates/footer');
108
        } else {
109
            redirect('permissions');
110
        }
111
    }
112
113
    public function check() {
114
@@ 123-136 (lines=14) @@
120
        $this->load->view('templates/footer');
121
    }
122
123
    public function pending() {
124
125
        if (in_array('CN=Dashboard_CS_NS,OU=Dashboard_Group,OU=Intranet_Group,OU=Groups,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
126
127
            $data = array();
128
            $data['private_drive'] = $this->private_drive_model->get_pending();
129
130
            $this->load->view('templates/header');
131
            $this->load->view('computing-support/private-drive/pending', $data);
132
            $this->load->view('templates/footer');
133
        } else {
134
            redirect('permissions');
135
        }
136
    }
137
138
    public function cancel() {
139

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

@@ 75-88 (lines=14) @@
72
        }
73
    }
74
    
75
    public function history() {
76
77
        if (in_array('CN=DG06,OU=Distribution Groups,OU=Email Groups,OU=Accounts,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
78
79
            $data = array();
80
            $data['temporary_account'] = $this->temporary_account_model->get_all();
81
82
            $this->load->view('templates/header');
83
            $this->load->view('computing-support/temporary-account/history', $data);
84
            $this->load->view('templates/footer');
85
        } else {
86
            redirect('permissions');
87
        }
88
    }
89
    
90
    public function check() {
91
@@ 100-113 (lines=14) @@
97
        $this->load->view('templates/footer');
98
    }
99
100
    public function pending() {
101
102
        if (in_array('CN=DG06,OU=Distribution Groups,OU=Email Groups,OU=Accounts,DC=cant-col,DC=ac,DC=uk', $_SESSION['ldap']['groups'])) {
103
104
            $data = array();
105
            $data['temporary_account'] = $this->temporary_account_model->get_pending();
106
107
            $this->load->view('templates/header');
108
            $this->load->view('computing-support/temporary-account/pending', $data);
109
            $this->load->view('templates/footer');
110
        } else {
111
            redirect('permissions');
112
        }
113
    }
114
    
115
    public function cancel() {
116