Passed
Push — master ( 4edea6...e7683e )
by William
03:13
created
dashboard/application/views/templates/table_assets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
2 2
 
3
-<?php foreach($css_files as $file): ?>
3
+<?php foreach ($css_files as $file): ?>
4 4
     <link type="text/css" rel="stylesheet" href="<?= $file; ?>" />
5 5
 <?php endforeach; ?>
6
-<?php foreach($js_files as $file): ?>
6
+<?php foreach ($js_files as $file): ?>
7 7
     <script src="<?= $file; ?>"></script>
8 8
 <?php endforeach;
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
dashboard/application/core/MY_Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if (isset($_COOKIE['CI-CONCRETE5']) === FALSE) {
68 68
 
69 69
             $this->session->set_userdata('last_url', current_url());
70
-            redirect('http://'.$_SERVER['HTTP_HOST'].'/authentication/dashboard?url=' . current_url());
70
+            redirect('http://'.$_SERVER['HTTP_HOST'].'/authentication/dashboard?url='.current_url());
71 71
         } else {
72 72
 
73 73
             $cookie = $_COOKIE['CI-CONCRETE5'];
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 //expire fake cookie
80 80
                 setcookie('CI-CONCRETE5', 'expired', time() - (1), "/");
81 81
                 $this->session->set_userdata('last_url', current_url());
82
-                redirect('http://'.$_SERVER['HTTP_HOST'].'/authentication/dashboard?url=' . current_url());
82
+                redirect('http://'.$_SERVER['HTTP_HOST'].'/authentication/dashboard?url='.current_url());
83 83
             } else {
84 84
 
85 85
                 $user_ldap = $this->user_model->user_ldap($username);
Please login to merge, or discard this patch.
dashboard/application/controllers/computing-support/Temporary_account.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $data = array();
18 18
         $data['faculty'] = $this->temporary_account_model->get_faculty();
19 19
         $data['department'] = $this->temporary_account_model->get_department();
20
-        $data['tempid'] = "tempuser" . $this->temporary_account_model->get_next_temp();
20
+        $data['tempid'] = "tempuser".$this->temporary_account_model->get_next_temp();
21 21
 
22 22
         //validation
23 23
         $this->form_validation->set_rules('faculty', 'Faculty', 'trim|required');
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
                 $this->email->from('[email protected]', 'Temporary Logon Account Request');
48 48
                 $this->email->to('[email protected]');
49 49
                 $this->email->subject('Temporary Logon Account Request');
50
-                $this->email->message('A temporary network account has been requested by ' . $_SESSION['ldap']['full_name']
51
-                        . ' for ' . $this->input->post('requester')
50
+                $this->email->message('A temporary network account has been requested by '.$_SESSION['ldap']['full_name']
51
+                        . ' for '.$this->input->post('requester')
52 52
                         . ''
53
-                        . 'the user will be: ' . $this->input->post('first_name') . ' ' . $this->input->post('last_name')
53
+                        . 'the user will be: '.$this->input->post('first_name').' '.$this->input->post('last_name')
54 54
                         . ''
55 55
                         . 'Approve https://intranet.cant-col.ac.uk/dashboard/computing-support/temporary-account/approve');
56 56
                 $this->email->send();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $id = $_GET['id'];
124 124
                 $this->temporary_account_model->cancel($id);
125 125
 
126
-                $function = 'temp_account_CANCEL_' . $id;
126
+                $function = 'temp_account_CANCEL_'.$id;
127 127
                 $this->user_model->function_log($function);
128 128
 
129 129
                 redirect($_SERVER['HTTP_REFERER']);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $id = $_GET['id'];
144 144
                 $this->temporary_account_model->reject($id);
145 145
 
146
-                $function = 'temp_account_REJECT_' . $id;
146
+                $function = 'temp_account_REJECT_'.$id;
147 147
                 $this->user_model->function_log($function);
148 148
 
149 149
                 redirect($_SERVER['HTTP_REFERER']);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 $id = $_GET['id'];
165 165
                 //$this->temporary_account_model->approve($id);
166 166
 
167
-                $function = 'temp_account_APPROVED_' . $id;
167
+                $function = 'temp_account_APPROVED_'.$id;
168 168
                 $this->user_model->function_log($function);
169 169
         
170 170
                     $data = array();
@@ -180,12 +180,12 @@  discard block
 block discarded – undo
180 180
 
181 181
                     //Format dd-mm-yyyy
182 182
                     //Expiry is beginning of day (thats why +1 day
183
-                    $dateFromForm = date('d-m-Y', strtotime($data['AD'][0]['expiry']. ' +1 day'));
183
+                    $dateFromForm = date('d-m-Y', strtotime($data['AD'][0]['expiry'].' +1 day'));
184 184
 
185 185
                     //Format hh:mm:ss
186 186
                     $timeFromForm = "00:00:00";
187 187
 
188
-                    $dateWithTime = $dateFromForm . " " . $timeFromForm;
188
+                    $dateWithTime = $dateFromForm." ".$timeFromForm;
189 189
 
190 190
                     function convertDateToUnix($input) {
191 191
                         $format = 'd-m-Y H:i:s';
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
                     //$WIN = convertUnixtoWin($UNIX);
203 203
 
204 204
                     //Create Unicode password
205
-                    $passwordWithQuotes = '"' . $data['AD'][0]['password'] . '"';
205
+                    $passwordWithQuotes = '"'.$data['AD'][0]['password'].'"';
206 206
                     $ldaprecord = array();
207 207
                     $ldaprecord["unicodepwd"] = iconv('UTF-8', 'UTF-16LE', $passwordWithQuotes);
208 208
 
@@ -212,20 +212,20 @@  discard block
 block discarded – undo
212 212
                     $ldaprecord["sn"] = $data['AD'][0]['last_name'];
213 213
                     $ldaprecord["mail"] = $data['AD'][0]['email'];
214 214
                     $ldaprecord["sAMAccountName"] = $data['AD'][0]['username'];
215
-                    $ldaprecord["displayName"] = $data['AD'][0]['first_name'] . " " . $data['AD'][0]['last_name'];
215
+                    $ldaprecord["displayName"] = $data['AD'][0]['first_name']." ".$data['AD'][0]['last_name'];
216 216
                     $ldaprecord["l"] = "Canterbury";
217
-                    $ldaprecord["description"] = "Temp account created by dashboard for " . $ldaprecord["displayName"];
217
+                    $ldaprecord["description"] = "Temp account created by dashboard for ".$ldaprecord["displayName"];
218 218
                     //$ldaprecord["accountExpires"] = $WIN;
219 219
                     $ldaprecord["UserAccountControl"] = "512"; //512 - Enabled Account
220
-                    $ldaprecord['userPrincipalName'] = $data['AD'][0]['username'] . '@cant-col.ac.uk';
220
+                    $ldaprecord['userPrincipalName'] = $data['AD'][0]['username'].'@cant-col.ac.uk';
221 221
                     $ldaprecord['objectclass'][0] = "top";
222 222
                     $ldaprecord['objectclass'][1] = "person";
223 223
                     $ldaprecord['objectclass'][2] = "organizationalPerson";
224 224
                     $ldaprecord['objectclass'][3] = "user";
225
-                    $dn = 'CN=' . $ldaprecord["cn"] . ',OU=Temp Accounts,OU=Students,OU=Accounts,DC=cant-col,DC=ac,DC=uk';
225
+                    $dn = 'CN='.$ldaprecord["cn"].',OU=Temp Accounts,OU=Students,OU=Accounts,DC=cant-col,DC=ac,DC=uk';
226 226
 
227 227
                     // Connect to Active Directory
228
-                    $ds = ldap_connect('ldaps://' . $AD_server);
228
+                    $ds = ldap_connect('ldaps://'.$AD_server);
229 229
 
230 230
                     if ($ds) {
231 231
                         ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
Please login to merge, or discard this patch.