summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2009-02-15 17:40:23 +0100
committerDerek Allard <derek.allard@ellislab.com>2009-02-15 17:40:23 +0100
commit70d835456214cf26d1b09cfa250a6fcb44910368 (patch)
tree7ae604a193bfad1f1fb11ff6d21de1f312bdaf47 /system
parenteeff9813bb5496f39a2ce6294766a5126df1b3b3 (diff)
experimental rename upload file
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Upload.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index e40ef2bad..92bf6912b 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -187,7 +187,7 @@ class CI_Upload {
// Set the uploaded data as class variables
$this->file_temp = $_FILES[$field]['tmp_name'];
- $this->file_name = $this->_prep_filename($_FILES[$field]['name']);
+ $this->file_name = ($this->file_name != '') ? $this->_prep_filename($this->file_name) : $this->_prep_filename($_FILES[$field]['name']);
$this->file_size = $_FILES[$field]['size'];
$this->file_type = preg_replace("/^(.+?);.*$/", "\\1", $_FILES[$field]['type']);
$this->file_type = strtolower($this->file_type);