Ticket #15955: 15955.2.patch
File 15955.2.patch, 1001 bytes (added by , 14 years ago) |
---|
-
wp-admin/includes/file.php
356 356 // A writable uploads dir will pass this test. Again, there's no point overriding this one. 357 357 if ( ! ( ( $uploads = wp_upload_dir($time) ) && false === $uploads['error'] ) ) 358 358 return call_user_func($upload_error_handler, $file, $uploads['error'] ); 359 359 360 // On Windows platforms, PHP will mangle characters not in the CP1251 charset, see http://bugs.php.net/bug.php?id=47096 361 if( 'WIN' == substr(PHP_OS, 0, 3) ) 362 $file['name'] = iconv( get_option( 'blog_charset' ), 'Windows-1251//TRANSLIT', $file['name'] ); 363 360 364 $filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback ); 361 365 362 366 // Move the file to the uploads dir 363 367 $new_file = $uploads['path'] . "/$filename"; 364 368 if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) )