Make some branching look less crazy.

git-svn-id: https://develop.svn.wordpress.org/trunk@14203 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-23 19:00:30 +00:00
parent 8dc372a5ea
commit 9930e8cd4b
1 changed files with 2 additions and 2 deletions

View File

@ -1163,8 +1163,8 @@ function upload_is_user_over_quota( $echo = true ) {
function check_upload_mimes( $mimes ) {
$site_exts = explode( " ", get_site_option( "upload_filetypes" ) );
foreach ( $site_exts as $ext ) {
foreach ( $mimes as $ext_pattern => $mime )
if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false ) {
foreach ( $mimes as $ext_pattern => $mime ) {
if ( $ext != '' && strpos( $ext_pattern, $ext ) !== false )
$site_mimes[$ext_pattern] = $mime;
}
}