summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-03-21 15:32:22 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-03-21 15:32:22 +0000
commit7cb97c7fc538ee0564e80e3adf1ddf40e28aca26 (patch)
tree45e19143b0d552f4f101b2f49547e2efb630b453
parent28fda1945974b33b6c09b3ccedf9d7d65b09e1cf (diff)
downloadwordpress-mu-7cb97c7fc538ee0564e80e3adf1ddf40e28aca26.tar.gz
wordpress-mu-7cb97c7fc538ee0564e80e3adf1ddf40e28aca26.tar.xz
wordpress-mu-7cb97c7fc538ee0564e80e3adf1ddf40e28aca26.zip
Use strpos, faster than preg_match
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1216 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-includes/wpmu-functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 251662a..2c3f481 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1594,7 +1594,7 @@ 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 ( preg_match("/$ext_pattern/", $ext) )
+ if( strpos( $ext_pattern, $ext ) !== false )
$site_mimes[$ext_pattern] = $mime;
return $site_mimes;
}