@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * |
78 | 78 | * @var array |
79 | 79 | */ |
80 | - public $mimes = array(); |
|
80 | + public $mimes = array(); |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * Mime-type for the current page |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * |
113 | 113 | * @var array |
114 | 114 | */ |
115 | - protected $_profiler_sections = array(); |
|
115 | + protected $_profiler_sections = array(); |
|
116 | 116 | |
117 | 117 | /** |
118 | 118 | * Parse markers flag |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | isset(self::$func_overload) OR self::$func_overload = ( ! is_php('8.0') && extension_loaded('mbstring') && @ini_get('mbstring.func_overload')); |
168 | 168 | |
169 | 169 | // Get mime types for later |
170 | - $this->mimes =& get_mimes(); |
|
170 | + $this->mimes = & get_mimes(); |
|
171 | 171 | |
172 | 172 | log_message('info', 'Output Class Initialized'); |
173 | 173 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | // Is this extension supported? |
266 | 266 | if (isset($this->mimes[$extension])) |
267 | 267 | { |
268 | - $mime_type =& $this->mimes[$extension]; |
|
268 | + $mime_type = & $this->mimes[$extension]; |
|
269 | 269 | |
270 | 270 | if (is_array($mime_type)) |
271 | 271 | { |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | { |
336 | 336 | if (strncasecmp($header, $headers[$c], $l = self::strlen($header)) === 0) |
337 | 337 | { |
338 | - return trim(self::substr($headers[$c], $l+1)); |
|
338 | + return trim(self::substr($headers[$c], $l + 1)); |
|
339 | 339 | } |
340 | 340 | } |
341 | 341 | |
@@ -438,13 +438,13 @@ discard block |
||
438 | 438 | // Note: We use load_class() because we can't use $CI =& get_instance() |
439 | 439 | // since this function is sometimes called by the caching mechanism, |
440 | 440 | // which happens before the CI super object is available. |
441 | - $BM =& load_class('Benchmark', 'core'); |
|
442 | - $CFG =& load_class('Config', 'core'); |
|
441 | + $BM = & load_class('Benchmark', 'core'); |
|
442 | + $CFG = & load_class('Config', 'core'); |
|
443 | 443 | |
444 | 444 | // Grab the super object if we can. |
445 | 445 | if (class_exists('CI_Controller', FALSE)) |
446 | 446 | { |
447 | - $CI =& get_instance(); |
|
447 | + $CI = & get_instance(); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | // -------------------------------------------------------------------- |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | // Set the output data |
453 | 453 | if ($output === '') |
454 | 454 | { |
455 | - $output =& $this->final_output; |
|
455 | + $output = & $this->final_output; |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | // -------------------------------------------------------------------- |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | */ |
574 | 574 | public function _write_cache($output) |
575 | 575 | { |
576 | - $CI =& get_instance(); |
|
576 | + $CI = & get_instance(); |
|
577 | 577 | $path = $CI->config->item('cache_path'); |
578 | 578 | $cache_path = ($path === '') ? APPPATH.'cache/' : $path; |
579 | 579 | |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | */ |
753 | 753 | public function delete_cache($uri = '') |
754 | 754 | { |
755 | - $CI =& get_instance(); |
|
755 | + $CI = & get_instance(); |
|
756 | 756 | $cache_path = $CI->config->item('cache_path'); |
757 | 757 | if ($cache_path === '') |
758 | 758 | { |
@@ -296,8 +296,8 @@ discard block |
||
296 | 296 | { |
297 | 297 | empty($config) OR $this->initialize($config, FALSE); |
298 | 298 | |
299 | - $this->_mimes =& get_mimes(); |
|
300 | - $this->_CI =& get_instance(); |
|
299 | + $this->_mimes = & get_mimes(); |
|
300 | + $this->_CI = & get_instance(); |
|
301 | 301 | |
302 | 302 | log_message('info', 'Upload Class Initialized'); |
303 | 303 | } |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | else |
488 | 488 | { |
489 | 489 | // An extension was provided, let's have it! |
490 | - $this->file_ext = $this->get_extension($this->_file_name_override); |
|
490 | + $this->file_ext = $this->get_extension($this->_file_name_override); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | if ( ! $this->is_allowed_filetype(TRUE)) |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | // Convert the file size to kilobytes |
501 | 501 | if ($this->file_size > 0) |
502 | 502 | { |
503 | - $this->file_size = round($this->file_size/1024, 2); |
|
503 | + $this->file_size = round($this->file_size / 1024, 2); |
|
504 | 504 | } |
505 | 505 | |
506 | 506 | // Is the file size within the allowed maximum? |
@@ -833,10 +833,10 @@ discard block |
||
833 | 833 | { |
834 | 834 | $types = array(1 => 'gif', 2 => 'jpeg', 3 => 'png'); |
835 | 835 | |
836 | - $this->image_width = $D[0]; |
|
837 | - $this->image_height = $D[1]; |
|
838 | - $this->image_type = isset($types[$D[2]]) ? $types[$D[2]] : 'unknown'; |
|
839 | - $this->image_size_str = $D[3]; // string containing height and width |
|
836 | + $this->image_width = $D[0]; |
|
837 | + $this->image_height = $D[1]; |
|
838 | + $this->image_type = isset($types[$D[2]]) ? $types[$D[2]] : 'unknown'; |
|
839 | + $this->image_size_str = $D[3]; // string containing height and width |
|
840 | 840 | } |
841 | 841 | } |
842 | 842 | |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | $this->file_type = 'image/jpeg'; |
889 | 889 | } |
890 | 890 | |
891 | - $img_mimes = array('image/gif', 'image/jpeg', 'image/png', 'image/webp'); |
|
891 | + $img_mimes = array('image/gif', 'image/jpeg', 'image/png', 'image/webp'); |
|
892 | 892 | |
893 | 893 | return in_array($this->file_type, $img_mimes, TRUE); |
894 | 894 | } |
@@ -1038,7 +1038,7 @@ discard block |
||
1038 | 1038 | return FALSE; |
1039 | 1039 | } |
1040 | 1040 | |
1041 | - $this->upload_path = preg_replace('/(.+?)\/*$/', '\\1/', $this->upload_path); |
|
1041 | + $this->upload_path = preg_replace('/(.+?)\/*$/', '\\1/', $this->upload_path); |
|
1042 | 1042 | return TRUE; |
1043 | 1043 | } |
1044 | 1044 | |
@@ -1086,9 +1086,9 @@ discard block |
||
1086 | 1086 | $ext = ''; |
1087 | 1087 | if (strpos($filename, '.') !== FALSE) |
1088 | 1088 | { |
1089 | - $parts = explode('.', $filename); |
|
1090 | - $ext = '.'.array_pop($parts); |
|
1091 | - $filename = implode('.', $parts); |
|
1089 | + $parts = explode('.', $filename); |
|
1090 | + $ext = '.'.array_pop($parts); |
|
1091 | + $filename = implode('.', $parts); |
|
1092 | 1092 | } |
1093 | 1093 | |
1094 | 1094 | return substr($filename, 0, ($length - strlen($ext))).$ext; |