Changeset 287 for branches/1.1dev/lib


Ignore:
Timestamp:
Oct 21, 2007 1:08:47 AM (17 years ago)
Author:
quinn
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1dev/lib/Upload.inc.php

    r286 r287  
    371371                // Single upload.
    372372                if (isset($custom_file_name)) {
    373                     if (is_array($custom_file_name) && sizeof($custom_file_name) == 1) {
     373                    if (is_array($custom_file_name) && sizeof($custom_file_name) == 1 && '' != trim($custom_file_name[0])) {
    374374                        // Is an array, but just one value. Pull it out.
    375                         $custom_file_name = current($custom_file_name);
     375                        $file_name = trim($custom_file_name[0]);
    376376                        raiseMsg(sprintf(_("The file %s has been renamed to %s."), $files['name'][$i], $file_name), MSG_NOTICE, __FILE__, __LINE__);
    377377                        logMsg(sprintf('Using custom file name: %s', $file_name), LOG_DEBUG, __FILE__, __LINE__);
    378                     } else if (!is_array($custom_file_name) && '' != $custom_file_name) {
     378                    } else if (!is_array($custom_file_name) && '' != trim($custom_file_name)) {
    379379                        // Valid custom file name.
    380380                        $file_name = $custom_file_name;
Note: See TracChangeset for help on using the changeset viewer.