@@ -79,8 +79,7 @@ discard block |
||
79 | 79 | if ( $quiet === false ) |
80 | 80 | { |
81 | 81 | $this->collectOptions( $name, $options ); |
82 | - } |
|
83 | - else |
|
82 | + } else |
|
84 | 83 | { |
85 | 84 | $this->quietSetOptions( $name, $options ); |
86 | 85 | } |
@@ -219,8 +218,7 @@ discard block |
||
219 | 218 | } |
220 | 219 | |
221 | 220 | $fields = $this->parseFieldString($options['fields']); |
222 | - } |
|
223 | - else |
|
221 | + } else |
|
224 | 222 | { |
225 | 223 | $fields = $this->db->field_data( $table_name ); |
226 | 224 | } |
@@ -169,12 +169,10 @@ discard block |
||
169 | 169 | file_exists(APPPATH.'vendor/autoload.php') |
170 | 170 | ? require_once(APPPATH.'vendor/autoload.php') |
171 | 171 | : log_message('error', '$config[\'composer_autoload\'] is set to TRUE but '.APPPATH.'vendor/autoload.php was not found.'); |
172 | - } |
|
173 | - elseif (file_exists($composer_autoload)) |
|
172 | + } elseif (file_exists($composer_autoload)) |
|
174 | 173 | { |
175 | 174 | require_once($composer_autoload); |
176 | - } |
|
177 | - else |
|
175 | + } else |
|
178 | 176 | { |
179 | 177 | log_message('error', 'Could not find the specified $config[\'composer_autoload\'] path: '.$composer_autoload); |
180 | 178 | } |
@@ -250,8 +248,7 @@ discard block |
||
250 | 248 | // This is required for mb_convert_encoding() to strip invalid characters. |
251 | 249 | // That's utilized by CI_Utf8, but it's also done for consistency with iconv. |
252 | 250 | mb_substitute_character('none'); |
253 | - } |
|
254 | - else |
|
251 | + } else |
|
255 | 252 | { |
256 | 253 | define('MB_ENABLED', FALSE); |
257 | 254 | } |
@@ -264,8 +261,7 @@ discard block |
||
264 | 261 | // iconv.internal_encoding is deprecated starting with PHP 5.6 |
265 | 262 | // and it's usage triggers E_DEPRECATED messages. |
266 | 263 | @ini_set('iconv.internal_encoding', $charset); |
267 | - } |
|
268 | - else |
|
264 | + } else |
|
269 | 265 | { |
270 | 266 | define('ICONV_ENABLED', FALSE); |
271 | 267 | } |
@@ -402,16 +398,14 @@ discard block |
||
402 | 398 | if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')) |
403 | 399 | { |
404 | 400 | $e404 = TRUE; |
405 | - } |
|
406 | - else |
|
401 | + } else |
|
407 | 402 | { |
408 | 403 | require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php'); |
409 | 404 | |
410 | 405 | if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method)) |
411 | 406 | { |
412 | 407 | $e404 = TRUE; |
413 | - } |
|
414 | - elseif (method_exists($class, '_remap')) |
|
408 | + } elseif (method_exists($class, '_remap')) |
|
415 | 409 | { |
416 | 410 | $params = array($method, array_slice($URI->rsegments, 2)); |
417 | 411 | $method = '_remap'; |
@@ -453,8 +447,7 @@ discard block |
||
453 | 447 | $RTR->directory = ''; |
454 | 448 | } |
455 | 449 | } |
456 | - } |
|
457 | - else |
|
450 | + } else |
|
458 | 451 | { |
459 | 452 | $e404 = FALSE; |
460 | 453 | } |
@@ -470,8 +463,7 @@ discard block |
||
470 | 463 | 1 => $class, |
471 | 464 | 2 => $method |
472 | 465 | ); |
473 | - } |
|
474 | - else |
|
466 | + } else |
|
475 | 467 | { |
476 | 468 | show_404($RTR->directory.$class.'/'.$method); |
477 | 469 | } |
@@ -111,8 +111,7 @@ discard block |
||
111 | 111 | @chmod($file, 0777); |
112 | 112 | @unlink($file); |
113 | 113 | return TRUE; |
114 | - } |
|
115 | - elseif ( ! is_file($file) OR ($fp = @fopen($file, 'ab')) === FALSE) |
|
114 | + } elseif ( ! is_file($file) OR ($fp = @fopen($file, 'ab')) === FALSE) |
|
116 | 115 | { |
117 | 116 | return FALSE; |
118 | 117 | } |
@@ -253,8 +252,7 @@ discard block |
||
253 | 252 | if (file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php')) |
254 | 253 | { |
255 | 254 | require($file_path); |
256 | - } |
|
257 | - elseif ( ! $found) |
|
255 | + } elseif ( ! $found) |
|
258 | 256 | { |
259 | 257 | set_status_header(503); |
260 | 258 | echo 'The configuration file does not exist.'; |
@@ -322,12 +320,10 @@ discard block |
||
322 | 320 | if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) |
323 | 321 | { |
324 | 322 | $_mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); |
325 | - } |
|
326 | - elseif (file_exists(APPPATH.'config/mimes.php')) |
|
323 | + } elseif (file_exists(APPPATH.'config/mimes.php')) |
|
327 | 324 | { |
328 | 325 | $_mimes = include(APPPATH.'config/mimes.php'); |
329 | - } |
|
330 | - else |
|
326 | + } else |
|
331 | 327 | { |
332 | 328 | $_mimes = array(); |
333 | 329 | } |
@@ -354,12 +350,10 @@ discard block |
||
354 | 350 | if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') |
355 | 351 | { |
356 | 352 | return TRUE; |
357 | - } |
|
358 | - elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') |
|
353 | + } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') |
|
359 | 354 | { |
360 | 355 | return TRUE; |
361 | - } |
|
362 | - elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') |
|
356 | + } elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') |
|
363 | 357 | { |
364 | 358 | return TRUE; |
365 | 359 | } |
@@ -410,14 +404,16 @@ discard block |
||
410 | 404 | if ($status_code < 100) |
411 | 405 | { |
412 | 406 | $exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN |
413 | - if ($exit_status > 125) // 125 is EXIT__AUTO_MAX |
|
407 | + if ($exit_status > 125) { |
|
408 | + // 125 is EXIT__AUTO_MAX |
|
414 | 409 | { |
415 | - $exit_status = 1; // EXIT_ERROR |
|
410 | + $exit_status = 1; |
|
411 | + } |
|
412 | + // EXIT_ERROR |
|
416 | 413 | } |
417 | 414 | |
418 | 415 | $status_code = 500; |
419 | - } |
|
420 | - else |
|
416 | + } else |
|
421 | 417 | { |
422 | 418 | $exit_status = 1; // EXIT_ERROR |
423 | 419 | } |
@@ -556,8 +552,7 @@ discard block |
||
556 | 552 | if (isset($stati[$code])) |
557 | 553 | { |
558 | 554 | $text = $stati[$code]; |
559 | - } |
|
560 | - else |
|
555 | + } else |
|
561 | 556 | { |
562 | 557 | show_error('No status text available. Please check your status code number or supply your own message text.', 500); |
563 | 558 | } |
@@ -566,8 +561,7 @@ discard block |
||
566 | 561 | if (strpos(PHP_SAPI, 'cgi') === 0) |
567 | 562 | { |
568 | 563 | header('Status: '.$code.' '.$text, TRUE); |
569 | - } |
|
570 | - else |
|
564 | + } else |
|
571 | 565 | { |
572 | 566 | $server_protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1'; |
573 | 567 | header($server_protocol.' '.$code.' '.$text, TRUE, $code); |
@@ -93,16 +93,14 @@ discard block |
||
93 | 93 | if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) |
94 | 94 | { |
95 | 95 | $server_addr = '['.$_SERVER['SERVER_ADDR'].']'; |
96 | - } |
|
97 | - else |
|
96 | + } else |
|
98 | 97 | { |
99 | 98 | $server_addr = $_SERVER['SERVER_ADDR']; |
100 | 99 | } |
101 | 100 | |
102 | 101 | $base_url = (is_https() ? 'https' : 'http').'://'.$server_addr |
103 | 102 | .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); |
104 | - } |
|
105 | - else |
|
103 | + } else |
|
106 | 104 | { |
107 | 105 | $base_url = 'http://localhost/'; |
108 | 106 | } |
@@ -160,8 +158,7 @@ discard block |
||
160 | 158 | $this->config[$file] = isset($this->config[$file]) |
161 | 159 | ? array_merge($this->config[$file], $config) |
162 | 160 | : $config; |
163 | - } |
|
164 | - else |
|
161 | + } else |
|
165 | 162 | { |
166 | 163 | $this->config = array_merge($this->config, $config); |
167 | 164 | } |
@@ -176,8 +173,7 @@ discard block |
||
176 | 173 | if ($loaded === TRUE) |
177 | 174 | { |
178 | 175 | return TRUE; |
179 | - } |
|
180 | - elseif ($fail_gracefully === TRUE) |
|
176 | + } elseif ($fail_gracefully === TRUE) |
|
181 | 177 | { |
182 | 178 | return FALSE; |
183 | 179 | } |
@@ -217,8 +213,7 @@ discard block |
||
217 | 213 | if ( ! isset($this->config[$item])) |
218 | 214 | { |
219 | 215 | return NULL; |
220 | - } |
|
221 | - elseif (trim($this->config[$item]) === '') |
|
216 | + } elseif (trim($this->config[$item]) === '') |
|
222 | 217 | { |
223 | 218 | return ''; |
224 | 219 | } |
@@ -249,8 +244,7 @@ discard block |
||
249 | 244 | if ($protocol === '') |
250 | 245 | { |
251 | 246 | $base_url = substr($base_url, strpos($base_url, '//')); |
252 | - } |
|
253 | - else |
|
247 | + } else |
|
254 | 248 | { |
255 | 249 | $base_url = $protocol.substr($base_url, strpos($base_url, '://')); |
256 | 250 | } |
@@ -272,16 +266,14 @@ discard block |
||
272 | 266 | if (($offset = strpos($uri, '?')) !== FALSE) |
273 | 267 | { |
274 | 268 | $uri = substr($uri, 0, $offset).$suffix.substr($uri, $offset); |
275 | - } |
|
276 | - else |
|
269 | + } else |
|
277 | 270 | { |
278 | 271 | $uri .= $suffix; |
279 | 272 | } |
280 | 273 | } |
281 | 274 | |
282 | 275 | return $base_url.$this->slash_item('index_page').$uri; |
283 | - } |
|
284 | - elseif (strpos($uri, '?') === FALSE) |
|
276 | + } elseif (strpos($uri, '?') === FALSE) |
|
285 | 277 | { |
286 | 278 | $uri = '?'.$uri; |
287 | 279 | } |
@@ -312,8 +304,7 @@ discard block |
||
312 | 304 | if ($protocol === '') |
313 | 305 | { |
314 | 306 | $base_url = substr($base_url, strpos($base_url, '//')); |
315 | - } |
|
316 | - else |
|
307 | + } else |
|
317 | 308 | { |
318 | 309 | $base_url = $protocol.substr($base_url, strpos($base_url, '://')); |
319 | 310 | } |
@@ -342,8 +333,7 @@ discard block |
||
342 | 333 | $uri = implode('/', $uri); |
343 | 334 | } |
344 | 335 | return trim($uri, '/'); |
345 | - } |
|
346 | - elseif (is_array($uri)) |
|
336 | + } elseif (is_array($uri)) |
|
347 | 337 | { |
348 | 338 | return http_build_query($uri); |
349 | 339 | } |
@@ -122,8 +122,7 @@ discard block |
||
122 | 122 | { |
123 | 123 | $heading = 'Not Found'; |
124 | 124 | $message = 'The controller/method pair you requested was not found.'; |
125 | - } |
|
126 | - else |
|
125 | + } else |
|
127 | 126 | { |
128 | 127 | $heading = '404 Page Not Found'; |
129 | 128 | $message = 'The page you requested was not found.'; |
@@ -166,8 +165,7 @@ discard block |
||
166 | 165 | { |
167 | 166 | $message = "\t".(is_array($message) ? implode("\n\t", $message) : $message); |
168 | 167 | $template = 'cli'.DIRECTORY_SEPARATOR.$template; |
169 | - } |
|
170 | - else |
|
168 | + } else |
|
171 | 169 | { |
172 | 170 | set_status_header($status_code); |
173 | 171 | $message = '<p>'.(is_array($message) ? implode('</p><p>', $message) : $message).'</p>'; |
@@ -204,8 +202,7 @@ discard block |
||
204 | 202 | if (is_cli()) |
205 | 203 | { |
206 | 204 | $templates_path .= 'cli'.DIRECTORY_SEPARATOR; |
207 | - } |
|
208 | - else |
|
205 | + } else |
|
209 | 206 | { |
210 | 207 | set_status_header(500); |
211 | 208 | $templates_path .= 'html'.DIRECTORY_SEPARATOR; |
@@ -255,8 +252,7 @@ discard block |
||
255 | 252 | } |
256 | 253 | |
257 | 254 | $template = 'html'.DIRECTORY_SEPARATOR.'error_php'; |
258 | - } |
|
259 | - else |
|
255 | + } else |
|
260 | 256 | { |
261 | 257 | $template = 'cli'.DIRECTORY_SEPARATOR.'error_php'; |
262 | 258 | } |
@@ -143,8 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | $this->_run_hook($val); |
145 | 145 | } |
146 | - } |
|
147 | - else |
|
146 | + } else |
|
148 | 147 | { |
149 | 148 | $this->_run_hook($this->hooks[$which]); |
150 | 149 | } |
@@ -172,8 +171,7 @@ discard block |
||
172 | 171 | : $data(); |
173 | 172 | |
174 | 173 | return TRUE; |
175 | - } |
|
176 | - elseif ( ! is_array($data)) |
|
174 | + } elseif ( ! is_array($data)) |
|
177 | 175 | { |
178 | 176 | return FALSE; |
179 | 177 | } |
@@ -227,13 +225,11 @@ discard block |
||
227 | 225 | if (method_exists($this->_objects[$class], $function)) |
228 | 226 | { |
229 | 227 | $this->_objects[$class]->$function($params); |
230 | - } |
|
231 | - else |
|
228 | + } else |
|
232 | 229 | { |
233 | 230 | return $this->_in_progress = FALSE; |
234 | 231 | } |
235 | - } |
|
236 | - else |
|
232 | + } else |
|
237 | 233 | { |
238 | 234 | class_exists($class, FALSE) OR require_once($filepath); |
239 | 235 | |
@@ -246,8 +242,7 @@ discard block |
||
246 | 242 | $this->_objects[$class] = new $class(); |
247 | 243 | $this->_objects[$class]->$function($params); |
248 | 244 | } |
249 | - } |
|
250 | - else |
|
245 | + } else |
|
251 | 246 | { |
252 | 247 | function_exists($function) OR require_once($filepath); |
253 | 248 |
@@ -196,29 +196,30 @@ discard block |
||
196 | 196 | if (isset($array[$index])) |
197 | 197 | { |
198 | 198 | $value = $array[$index]; |
199 | - } |
|
200 | - elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) // Does the index contain array notation |
|
199 | + } elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) { |
|
200 | + // Does the index contain array notation |
|
201 | 201 | { |
202 | 202 | $value = $array; |
203 | + } |
|
203 | 204 | for ($i = 0; $i < $count; $i++) |
204 | 205 | { |
205 | 206 | $key = trim($matches[0][$i], '[]'); |
206 | - if ($key === '') // Empty notation will return the value as array |
|
207 | + if ($key === '') { |
|
208 | + // Empty notation will return the value as array |
|
207 | 209 | { |
208 | 210 | break; |
209 | 211 | } |
212 | + } |
|
210 | 213 | |
211 | 214 | if (isset($value[$key])) |
212 | 215 | { |
213 | 216 | $value = $value[$key]; |
214 | - } |
|
215 | - else |
|
217 | + } else |
|
216 | 218 | { |
217 | 219 | return NULL; |
218 | 220 | } |
219 | 221 | } |
220 | - } |
|
221 | - else |
|
222 | + } else |
|
222 | 223 | { |
223 | 224 | return NULL; |
224 | 225 | } |
@@ -401,8 +402,7 @@ discard block |
||
401 | 402 | if ( ! is_numeric($expire)) |
402 | 403 | { |
403 | 404 | $expire = time() - 86500; |
404 | - } |
|
405 | - else |
|
405 | + } else |
|
406 | 406 | { |
407 | 407 | $expire = ($expire > 0) ? time() + $expire : 0; |
408 | 408 | } |
@@ -448,8 +448,7 @@ discard block |
||
448 | 448 | if ( ! $this->valid_ip($spoof)) |
449 | 449 | { |
450 | 450 | $spoof = NULL; |
451 | - } |
|
452 | - else |
|
451 | + } else |
|
453 | 452 | { |
454 | 453 | break; |
455 | 454 | } |
@@ -502,8 +501,7 @@ discard block |
||
502 | 501 | } |
503 | 502 | |
504 | 503 | $sprintf = '%016b%016b%016b%016b%016b%016b%016b%016b'; |
505 | - } |
|
506 | - else |
|
504 | + } else |
|
507 | 505 | { |
508 | 506 | $ip = explode('.', $this->ip_address); |
509 | 507 | $sprintf = '%08b%08b%08b%08b'; |
@@ -523,8 +521,7 @@ discard block |
||
523 | 521 | { |
524 | 522 | $netaddr[$i] = intval($netaddr[$i], 16); |
525 | 523 | } |
526 | - } |
|
527 | - else |
|
524 | + } else |
|
528 | 525 | { |
529 | 526 | $netaddr = explode('.', $netaddr); |
530 | 527 | } |
@@ -605,8 +602,7 @@ discard block |
||
605 | 602 | if ($this->_allow_get_array === FALSE) |
606 | 603 | { |
607 | 604 | $_GET = array(); |
608 | - } |
|
609 | - elseif (is_array($_GET)) |
|
605 | + } elseif (is_array($_GET)) |
|
610 | 606 | { |
611 | 607 | foreach ($_GET as $key => $val) |
612 | 608 | { |
@@ -642,8 +638,7 @@ discard block |
||
642 | 638 | if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE) |
643 | 639 | { |
644 | 640 | $_COOKIE[$cookie_key] = $this->_clean_input_data($val); |
645 | - } |
|
646 | - else |
|
641 | + } else |
|
647 | 642 | { |
648 | 643 | unset($_COOKIE[$key]); |
649 | 644 | } |
@@ -729,8 +724,7 @@ discard block |
||
729 | 724 | if ($fatal === TRUE) |
730 | 725 | { |
731 | 726 | return FALSE; |
732 | - } |
|
733 | - else |
|
727 | + } else |
|
734 | 728 | { |
735 | 729 | set_status_header(503); |
736 | 730 | echo 'Disallowed Key Characters.'; |
@@ -885,8 +879,7 @@ discard block |
||
885 | 879 | { |
886 | 880 | isset($this->_raw_input_stream) OR $this->_raw_input_stream = file_get_contents('php://input'); |
887 | 881 | return $this->_raw_input_stream; |
888 | - } |
|
889 | - elseif ($name === 'ip_address') |
|
882 | + } elseif ($name === 'ip_address') |
|
890 | 883 | { |
891 | 884 | return $this->ip_address; |
892 | 885 | } |
@@ -192,16 +192,14 @@ discard block |
||
192 | 192 | if (empty($library)) |
193 | 193 | { |
194 | 194 | return $this; |
195 | - } |
|
196 | - elseif (is_array($library)) |
|
195 | + } elseif (is_array($library)) |
|
197 | 196 | { |
198 | 197 | foreach ($library as $key => $value) |
199 | 198 | { |
200 | 199 | if (is_int($key)) |
201 | 200 | { |
202 | 201 | $this->library($value, $params); |
203 | - } |
|
204 | - else |
|
202 | + } else |
|
205 | 203 | { |
206 | 204 | $this->library($key, $params, $value); |
207 | 205 | } |
@@ -236,8 +234,7 @@ discard block |
||
236 | 234 | if (empty($model)) |
237 | 235 | { |
238 | 236 | return $this; |
239 | - } |
|
240 | - elseif (is_array($model)) |
|
237 | + } elseif (is_array($model)) |
|
241 | 238 | { |
242 | 239 | foreach ($model as $key => $value) |
243 | 240 | { |
@@ -313,8 +310,7 @@ discard block |
||
313 | 310 | { |
314 | 311 | throw new RuntimeException('Unable to locate the model you have specified: '.$model); |
315 | 312 | } |
316 | - } |
|
317 | - elseif ( ! is_subclass_of($model, 'CI_Model')) |
|
313 | + } elseif ( ! is_subclass_of($model, 'CI_Model')) |
|
318 | 314 | { |
319 | 315 | throw new RuntimeException("Class ".$model." already exists and doesn't extend CI_Model"); |
320 | 316 | } |
@@ -425,8 +421,7 @@ discard block |
||
425 | 421 | require_once($driver_path); |
426 | 422 | $class = 'CI_DB_'.$db->dbdriver.'_'.$db->subdriver.'_forge'; |
427 | 423 | } |
428 | - } |
|
429 | - else |
|
424 | + } else |
|
430 | 425 | { |
431 | 426 | $class = 'CI_DB_'.$db->dbdriver.'_forge'; |
432 | 427 | } |
@@ -694,8 +689,7 @@ discard block |
||
694 | 689 | } |
695 | 690 | |
696 | 691 | return $this; |
697 | - } |
|
698 | - elseif (empty($library)) |
|
692 | + } elseif (empty($library)) |
|
699 | 693 | { |
700 | 694 | return FALSE; |
701 | 695 | } |
@@ -788,8 +782,7 @@ discard block |
||
788 | 782 | array_shift($this->_ci_helper_paths); |
789 | 783 | array_shift($this->_ci_view_paths); |
790 | 784 | array_pop($config->_config_paths); |
791 | - } |
|
792 | - else |
|
785 | + } else |
|
793 | 786 | { |
794 | 787 | $path = rtrim($path, '/').'/'; |
795 | 788 | foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var) |
@@ -851,8 +844,7 @@ discard block |
||
851 | 844 | { |
852 | 845 | $_ci_x = explode('/', $_ci_path); |
853 | 846 | $_ci_file = end($_ci_x); |
854 | - } |
|
855 | - else |
|
847 | + } else |
|
856 | 848 | { |
857 | 849 | $_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION); |
858 | 850 | $_ci_file = ($_ci_ext === '') ? $_ci_view.'.php' : $_ci_view; |
@@ -922,8 +914,7 @@ discard block |
||
922 | 914 | if ( ! is_php('5.4') && ! ini_get('short_open_tag') && config_item('rewrite_short_tags') === TRUE) |
923 | 915 | { |
924 | 916 | echo eval('?>'.preg_replace('/;*\s*\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($_ci_path)))); |
925 | - } |
|
926 | - else |
|
917 | + } else |
|
927 | 918 | { |
928 | 919 | include($_ci_path); // include() vs include_once() allows for multiple views with the same name |
929 | 920 | } |
@@ -950,8 +941,7 @@ discard block |
||
950 | 941 | if (ob_get_level() > $this->_ci_ob_level + 1) |
951 | 942 | { |
952 | 943 | ob_end_flush(); |
953 | - } |
|
954 | - else |
|
944 | + } else |
|
955 | 945 | { |
956 | 946 | $_ci_CI->output->append_output(ob_get_contents()); |
957 | 947 | @ob_end_clean(); |
@@ -989,8 +979,7 @@ discard block |
||
989 | 979 | |
990 | 980 | // Get the filename from the path |
991 | 981 | $class = substr($class, $last_slash); |
992 | - } |
|
993 | - else |
|
982 | + } else |
|
994 | 983 | { |
995 | 984 | $subdir = ''; |
996 | 985 | } |
@@ -1108,8 +1097,7 @@ discard block |
||
1108 | 1097 | if (class_exists($prefix.$library_name, FALSE)) |
1109 | 1098 | { |
1110 | 1099 | return $this->_ci_init_library($library_name, $prefix, $params, $object_name); |
1111 | - } |
|
1112 | - else |
|
1100 | + } else |
|
1113 | 1101 | { |
1114 | 1102 | log_message('debug', $path.' exists, but does not declare '.$prefix.$library_name); |
1115 | 1103 | } |
@@ -1129,8 +1117,7 @@ discard block |
||
1129 | 1117 | { |
1130 | 1118 | $prefix = config_item('subclass_prefix'); |
1131 | 1119 | break; |
1132 | - } |
|
1133 | - else |
|
1120 | + } else |
|
1134 | 1121 | { |
1135 | 1122 | log_message('debug', $path.' exists, but does not declare '.$subclass); |
1136 | 1123 | } |
@@ -1177,8 +1164,7 @@ discard block |
||
1177 | 1164 | { |
1178 | 1165 | include($path.'config/'.strtolower($class).'.php'); |
1179 | 1166 | $found = TRUE; |
1180 | - } |
|
1181 | - elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) |
|
1167 | + } elseif (file_exists($path.'config/'.ucfirst(strtolower($class)).'.php')) |
|
1182 | 1168 | { |
1183 | 1169 | include($path.'config/'.ucfirst(strtolower($class)).'.php'); |
1184 | 1170 | $found = TRUE; |
@@ -1188,8 +1174,7 @@ discard block |
||
1188 | 1174 | { |
1189 | 1175 | include($path.'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); |
1190 | 1176 | $found = TRUE; |
1191 | - } |
|
1192 | - elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) |
|
1177 | + } elseif (file_exists($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) |
|
1193 | 1178 | { |
1194 | 1179 | include($path.'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); |
1195 | 1180 | $found = TRUE; |
@@ -1380,8 +1365,7 @@ discard block |
||
1380 | 1365 | if ( ! is_array($filename)) |
1381 | 1366 | { |
1382 | 1367 | return array(strtolower(str_replace(array($extension, '.php'), '', $filename).$extension)); |
1383 | - } |
|
1384 | - else |
|
1368 | + } else |
|
1385 | 1369 | { |
1386 | 1370 | foreach ($filename as $key => $val) |
1387 | 1371 | { |
@@ -129,8 +129,7 @@ discard block |
||
129 | 129 | if (is_numeric($config['log_threshold'])) |
130 | 130 | { |
131 | 131 | $this->_threshold = (int) $config['log_threshold']; |
132 | - } |
|
133 | - elseif (is_array($config['log_threshold'])) |
|
132 | + } elseif (is_array($config['log_threshold'])) |
|
134 | 133 | { |
135 | 134 | $this->_threshold = 0; |
136 | 135 | $this->_threshold_array = array_flip($config['log_threshold']); |
@@ -198,8 +197,7 @@ discard block |
||
198 | 197 | $microtime_short = sprintf("%06d", ($microtime_full - floor($microtime_full)) * 1000000); |
199 | 198 | $date = new DateTime(date('Y-m-d H:i:s.'.$microtime_short, $microtime_full)); |
200 | 199 | $date = $date->format($this->_date_fmt); |
201 | - } |
|
202 | - else |
|
200 | + } else |
|
203 | 201 | { |
204 | 202 | $date = date($this->_date_fmt); |
205 | 203 | } |