Passed
Push — master ( 230ed5...f6def3 )
by William
02:51
created
dashboard/application/models/User_model.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -242,20 +242,20 @@
 block discarded – undo
242 242
     }
243 243
 
244 244
     function ip_is_private($ip) {
245
-       $safe_ip = array(
246
-           $this->config->item('safeipone'),
247
-           $this->config->item('safeiptwo'),
248
-           $this->config->item('safeipthree'),
249
-           $this->config->item('safeipfour'),
250
-           $this->config->item('safeipfive'),
251
-           $this->config->item('safeipsix'),
252
-           $this->config->item('safeipseven'),
253
-           $this->config->item('safeipeight'),
254
-           $this->config->item('safeipnine'),
255
-           $this->config->item('safeipten'),
256
-       );      
245
+        $safe_ip = array(
246
+            $this->config->item('safeipone'),
247
+            $this->config->item('safeiptwo'),
248
+            $this->config->item('safeipthree'),
249
+            $this->config->item('safeipfour'),
250
+            $this->config->item('safeipfive'),
251
+            $this->config->item('safeipsix'),
252
+            $this->config->item('safeipseven'),
253
+            $this->config->item('safeipeight'),
254
+            $this->config->item('safeipnine'),
255
+            $this->config->item('safeipten'),
256
+        );      
257 257
       
258
-      if (in_array($_SERVER['REMOTE_ADDR'], $safe_ip)) {
258
+        if (in_array($_SERVER['REMOTE_ADDR'], $safe_ip)) {
259 259
             return true;
260 260
         } else {
261 261
             return false;
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Room_move_model.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -93,16 +93,16 @@  discard block
 block discarded – undo
93 93
     
94 94
     public function check_status() {
95 95
         $this->db->where('requester_un', $_SESSION['username'])
96
-                 ->or_where('staff_involved_un', $_SESSION['username'])
97
-                 ->or_where('staff_involved_un2', $_SESSION['ldap']['full_name'])
98
-                 ->or_where('staff_involved_un3', $_SESSION['ldap']['full_name'])
99
-                 ->or_where('staff_involved_un4', $_SESSION['ldap']['full_name'])
100
-                 ->or_where('staff_involved_un5', $_SESSION['ldap']['full_name'])
101
-                 ->or_where('staff_involved_un6', $_SESSION['ldap']['full_name'])
102
-                 ->or_where('staff_involved_un7', $_SESSION['ldap']['full_name'])
103
-                 ->or_where('staff_involved_un8', $_SESSION['ldap']['full_name'])
104
-                 ->or_where('staff_involved_un9', $_SESSION['ldap']['full_name'])
105
-                 ->or_where('staff_involved_un10', $_SESSION['ldap']['full_name']);
96
+                    ->or_where('staff_involved_un', $_SESSION['username'])
97
+                    ->or_where('staff_involved_un2', $_SESSION['ldap']['full_name'])
98
+                    ->or_where('staff_involved_un3', $_SESSION['ldap']['full_name'])
99
+                    ->or_where('staff_involved_un4', $_SESSION['ldap']['full_name'])
100
+                    ->or_where('staff_involved_un5', $_SESSION['ldap']['full_name'])
101
+                    ->or_where('staff_involved_un6', $_SESSION['ldap']['full_name'])
102
+                    ->or_where('staff_involved_un7', $_SESSION['ldap']['full_name'])
103
+                    ->or_where('staff_involved_un8', $_SESSION['ldap']['full_name'])
104
+                    ->or_where('staff_involved_un9', $_SESSION['ldap']['full_name'])
105
+                    ->or_where('staff_involved_un10', $_SESSION['ldap']['full_name']);
106 106
         $query = $this->db->get('room_move');
107 107
         return $query->result_array();
108 108
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function cancel($id) {
131 131
             
132 132
         $this->db->where('id', $id);
133
-	$this->db->from('room_move');
133
+    $this->db->from('room_move');
134 134
         $data = array(
135 135
             'status' => '4',
136 136
             'canceled_by' => $_SESSION['ldap']['full_name'],
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function eh_reject($id) {
143 143
             
144 144
         $this->db->where('id', $id);
145
-	$this->db->from('room_move');
145
+    $this->db->from('room_move');
146 146
         $data = array(
147 147
             'status' => '2',
148 148
             'estates_at' => date("Y-m-d H:i:s", time()),
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     public function eh_approve($id) {
155 155
             
156 156
         $this->db->where('id', $id);
157
-	$this->db->from('room_move');
157
+    $this->db->from('room_move');
158 158
         $data = array(
159 159
             'status' => '1',
160 160
             'estates_at' => date("Y-m-d H:i:s", time()),
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     public function cs_reject($id) {
168 168
             
169 169
         $this->db->where('id', $id);
170
-	$this->db->from('room_move');
170
+    $this->db->from('room_move');
171 171
         $data = array(
172 172
             'status' => '3',
173 173
             'cs_at' => date("Y-m-d H:i:s", time()),
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     public function cs_approve($id) {
180 180
             
181 181
         $this->db->where('id', $id);
182
-	$this->db->from('room_move');
182
+    $this->db->from('room_move');
183 183
         $data = array(
184 184
             'status' => '5',
185 185
             'cs_at' => date("Y-m-d H:i:s", time()),
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     public function cs_complete($id) {
193 193
             
194 194
         $this->db->where('id', $id);
195
-	$this->db->from('room_move');
195
+    $this->db->from('room_move');
196 196
         $data = array(
197 197
             'status' => '6',
198 198
             'completed_at' => date("Y-m-d H:i:s", time()),
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Address_book_Model.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         
56 56
         $this->db->select('faculty');
57 57
         $this->db->where('cat_id', $faculty);
58
-	$this->db->from('faculty');
58
+    $this->db->from('faculty');
59 59
         return $this->db->get()->result_array();
60 60
     }
61 61
     
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         
64 64
         $this->db->select('subfaculty');
65 65
         $this->db->where('cat_key', $department);
66
-	$this->db->from('facultysub');
66
+    $this->db->from('facultysub');
67 67
         return $this->db->get()->result_array();
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Private_drive_model.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function cancel($id) {
71 71
             
72 72
         $this->db->where('id', $id);
73
-	$this->db->from('private_drive');
73
+    $this->db->from('private_drive');
74 74
         $data = array(
75 75
             'status' => '5',
76 76
             'canceled_by' => $_SESSION['ldap']['full_name'],
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function fh_reject($id) {
83 83
             
84 84
         $this->db->where('id', $id);
85
-	$this->db->from('private_drive');
85
+    $this->db->from('private_drive');
86 86
         $data = array(
87 87
             'status' => '3',
88 88
             'approved_at' => date("Y-m-d H:i:s", time()),
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public function fh_approve($id) {
94 94
             
95 95
         $this->db->where('id', $id);
96
-	$this->db->from('private_drive');
96
+    $this->db->from('private_drive');
97 97
         $data = array(
98 98
             'status' => '1',
99 99
             'approved_at' => date("Y-m-d H:i:s", time()),
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function cs_reject($id) {
106 106
             
107 107
         $this->db->where('id', $id);
108
-	$this->db->from('private_drive');
108
+    $this->db->from('private_drive');
109 109
         $data = array(
110 110
             'status' => '4',
111 111
             'actioned_at' => date("Y-m-d H:i:s", time()),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function cs_approve($id) {
118 118
             
119 119
         $this->db->where('id', $id);
120
-	$this->db->from('private_drive');
120
+    $this->db->from('private_drive');
121 121
         $data = array(
122 122
             'status' => '2',
123 123
             'actioned_at' => date("Y-m-d H:i:s", time()),
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Ownership_model.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function approve($id) {
55 55
             
56 56
         $this->db->where('id', $id);
57
-	$this->db->from('ownership');
57
+    $this->db->from('ownership');
58 58
         $data = array(
59 59
             'status' => '3',
60 60
             'transfer' => date("Y-m-d H:i:s", time()),
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function reject($id) {
68 68
             
69 69
         $this->db->where('id', $id);
70
-	$this->db->from('ownership');
70
+    $this->db->from('ownership');
71 71
         $data = array(
72 72
             'status' => '2',
73 73
             'transfer' => date("Y-m-d H:i:s", time()),
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function cancel($id) {
81 81
             
82 82
         $this->db->where('id', $id);
83
-	$this->db->from('ownership');
83
+    $this->db->from('ownership');
84 84
         $data = array(
85 85
             'status' => '4',
86 86
         );
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     public function terms($id) {
92 92
             
93 93
         $this->db->where('id', $id);
94
-	$this->db->from('ownership');
94
+    $this->db->from('ownership');
95 95
         $data = array(
96 96
             'status' => '1',
97 97
             'policy_accepted' => date("Y-m-d H:i:s", time()),
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Temporary_account_model.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     public function cancel($id) {
147 147
             
148 148
         $this->db->where('id', $id);
149
-	$this->db->from('temporary_account');
149
+    $this->db->from('temporary_account');
150 150
         $data = array(
151 151
             'status' => '3',
152 152
         );
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function reject($id) {
157 157
             
158 158
         $this->db->where('id', $id);
159
-	$this->db->from('temporary_account');
159
+    $this->db->from('temporary_account');
160 160
         $data = array(
161 161
             'status' => '2',
162 162
             'status_at' => date("Y-m-d H:i:s", time()),
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     public function approve($id) {
169 169
             
170 170
         $this->db->where('id', $id);
171
-	$this->db->from('temporary_account');
171
+    $this->db->from('temporary_account');
172 172
         $data = array(
173 173
             'status' => '1',
174 174
             'status_at' => date("Y-m-d H:i:s", time()),
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     public function created_account($id) {
182 182
             
183 183
         $this->db->where('id', $id);
184
-	$this->db->from('temporary_account');
184
+    $this->db->from('temporary_account');
185 185
         $data = array(
186 186
             'created' => '1',
187 187
         );
Please login to merge, or discard this patch.
dashboard/application/models/computing-support/Status_model.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 class Status_model extends CI_Model {
4 4
     
5 5
     public function __construct() {
6
-	parent::__construct();		
6
+    parent::__construct();		
7 7
     }
8 8
     
9 9
     public function view() {
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         
19 19
         $data = array(
20 20
             'id', 'name', 'status', 'url', 'auto_status'
21
-	);
21
+    );
22 22
             
23 23
         $query = $this->db->get('status');
24 24
         return $query->result_array();
@@ -59,9 +59,9 @@  discard block
 block discarded – undo
59 59
         $data = array(
60 60
             'sid' => $service_id,
61 61
             'auto_status' => $service_status
62
-	);	
62
+    );	
63 63
         
64
-	return $this->db->insert('status_logs', $data);
64
+    return $this->db->insert('status_logs', $data);
65 65
     }
66 66
     
67 67
     public function percentage($sid) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->db->where('sid', $sid);
71 71
         $this->db->order_by('id', 'DESC');
72 72
         $this->db->limit('5000');
73
-	$this->db->from('status_logs');
73
+    $this->db->from('status_logs');
74 74
         $total = $this->db->get()->num_rows();
75 75
         
76 76
         $this->db->select('sid');
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->db->where('auto_status', 1);
79 79
         $this->db->order_by('id', 'DESC');
80 80
         $this->db->limit('5000');
81
-	$this->db->from('status_logs');
81
+    $this->db->from('status_logs');
82 82
         $up = $this->db->get()->num_rows();
83 83
         
84 84
         if (empty($total)) { 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             
100 100
         $this->db->select('sid');
101 101
         $this->db->where('sid', $sid);
102
-	$this->db->from('status_logs');
102
+    $this->db->from('status_logs');
103 103
         $this->db->delete();
104 104
         
105 105
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         
109 109
         $this->db->select();
110 110
         $this->db->where('id', $sid);
111
-	$this->db->from('status');
111
+    $this->db->from('status');
112 112
         $query = $this->db->get();
113 113
         return $query->result_array();
114 114
     }
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
             'auto_status'   => $status,
130 130
             'last_update'   => date("Y-m-d H:i:s", time()),
131 131
             'by'   => $username,
132
-	);
132
+    );
133 133
         
134 134
         $this->db->where('id', $id);
135
-	return $this->db->update('status', $data);
135
+    return $this->db->update('status', $data);
136 136
     }
137 137
 
138 138
     public function create($name, $icon, $url, $category, $status) {
@@ -146,21 +146,21 @@  discard block
 block discarded – undo
146 146
             'auto_status'   => $status,
147 147
             'last_update'   => date("Y-m-d H:i:s", time()),
148 148
             'by'   => $username,
149
-	);
149
+    );
150 150
         
151
-	return $this->db->insert('status', $data);
151
+    return $this->db->insert('status', $data);
152 152
     }
153 153
     
154 154
     public function delete($sid) {
155 155
             
156 156
         $this->db->select('sid');
157 157
         $this->db->where('sid', $sid);
158
-	$this->db->from('status_logs');
158
+    $this->db->from('status_logs');
159 159
         $this->db->delete();
160 160
         
161 161
         $this->db->select('id');
162 162
         $this->db->where('id', $sid);
163
-	$this->db->from('status');
163
+    $this->db->from('status');
164 164
         $this->db->delete();
165 165
         
166 166
     }
Please login to merge, or discard this patch.
dashboard/application/views/errors/cli/error_general.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 defined('BASEPATH') OR exit('No direct script access allowed');
3 3
 
4 4
 echo "\nERROR: ",
5
-	$heading,
6
-	"\n\n",
7
-	$message,
8
-	"\n\n";
9 5
\ No newline at end of file
6
+    $heading,
7
+    "\n\n",
8
+    $message,
9
+    "\n\n";
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
dashboard/application/views/errors/cli/error_db.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 defined('BASEPATH') OR exit('No direct script access allowed');
3 3
 
4 4
 echo "\nDatabase error: ",
5
-	$heading,
6
-	"\n\n",
7
-	$message,
8
-	"\n\n";
9 5
\ No newline at end of file
6
+    $heading,
7
+    "\n\n",
8
+    $message,
9
+    "\n\n";
10 10
\ No newline at end of file
Please login to merge, or discard this patch.