Ignore:
Timestamp:
Dec 13, 2005 7:43:12 AM (18 years ago)
Author:
scdev
Message:

Fixed mime_content_type bug in Upload.inc.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r34 r35  
    300300        // To keep this script running even if user tries to stop browser.
    301301        ignore_user_abort(true);
    302         if (!ini_get('safe_mode')) {
    303             set_time_limit(300);
    304         }
     302        ini_set('max_execution_time', 300);
     303        ini_set('max_input_time', 300);
    305304
    306305        $new_file_names = array();
     
    347346            // If the file name has no extension, use the mime-type extension.
    348347            if (!preg_match('/\.[^.]{1,5}$/', $file_name) && function_exists('mime_content_type')) {
    349                 if ($ext = array_search(mime_content_type($files['type'][$i]), $this->mime_extension_map)) {
     348                if ($ext = array_search(mime_content_type($files['tmp_name'][$i]), $this->mime_extension_map)) {
    350349                    $file_name .= ".$ext";
    351350                }
Note: See TracChangeset for help on using the changeset viewer.