Ticket #27882: dead-code-admin-inc-file.diff
File dead-code-admin-inc-file.diff, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/file.php
294 294 if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) 295 295 return call_user_func($upload_error_handler, $file, __( 'Sorry, this file type is not permitted for security reasons.' )); 296 296 297 if ( !$ext )298 $ext = ltrim(strrchr($file['name'], '.'), '.');299 300 297 if ( !$type ) 301 298 $type = $file['type']; 302 299 } else { … … 434 431 if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) 435 432 return $upload_error_handler( $file, __( 'Sorry, this file type is not permitted for security reasons.' )); 436 433 437 if ( !$ext )438 $ext = ltrim(strrchr($file['name'], '.'), '.');439 440 434 if ( !$type ) 441 435 $type = $file['type']; 442 436 } … … 1062 1056 } 1063 1057 $hostname = ''; 1064 1058 $username = ''; 1065 $password = '';1066 1059 $connection_type = ''; 1067 1060 if ( !empty($credentials) ) 1068 1061 extract($credentials, EXTR_OVERWRITE);