summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAdrian <adrian@digiworks.fr>2013-06-25 12:09:22 +0200
committerAdrian <adrian@digiworks.fr>2013-06-25 12:09:22 +0200
commit74a228b0b842e4aeb8cc9326c5d10c1fe4f4ce06 (patch)
treeb520231a2c1337c7b2aaefbf758d2d0c6d7c42e6 /system/libraries
parentf496d13ee26c13b3406d30013206af679bf68922 (diff)
New var name to make it more comprehensive
Changes to follow the styleguide, proposed by narfbg (thanks to him)
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Upload.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 14863d69a..5861df584 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -140,7 +140,7 @@ class CI_Upload {
*
* @var string
*/
- public $file_ext_case = FALSE;
+ public $file_ext_tolower = FALSE;
/**
* Upload path
@@ -301,7 +301,7 @@ class CI_Upload {
'file_type' => '',
'file_size' => NULL,
'file_ext' => '',
- 'file_ext_case' => FALSE,
+ 'file_ext_tolower' => FALSE,
'upload_path' => '',
'overwrite' => FALSE,
'encrypt_name' => FALSE,
@@ -974,10 +974,13 @@ class CI_Upload {
{
$x = explode('.', $filename);
- if($this->file_ext_case)
- return (count($x) !== 1) ? '.'.strtolower(end($x)) : '';
- else
- return (count($x) !== 1) ? '.'.end($x) : '';
+ if (count($x) === 1)
+ {
+ return '';
+ }
+
+ $ext = ($this->file_ext_tolower) ? strtolower(end($x)) : end($x);
+ return '.'.$ext;
}
// --------------------------------------------------------------------
@@ -1296,4 +1299,4 @@ class CI_Upload {
}
/* End of file Upload.php */
-/* Location: ./system/libraries/Upload.php */
+/* Location: ./system/libraries/Upload.php */ \ No newline at end of file