From 40570257b12eb6eed5b5639784cc2a3aae4c7de0 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Jan 2010 19:04:55 +0000 Subject: [PATCH] Merge mu_upload_dir() into wp_upload_dir(). see #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@12850 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 +++ wp-includes/ms-functions.php | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f9937f969a..c83e92a398 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2062,6 +2062,9 @@ function wp_upload_dir( $time = null ) { $url = trailingslashit( $siteurl ) . UPLOADS; } + if ( is_multisite() && defined( 'BLOGUPLOADDIR' ) ) + $dir = untrailingslashit(BLOGUPLOADDIR); + $bdir = $dir; $burl = $url; diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 7031755069..848fa17c0c 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1998,17 +1998,6 @@ function lowercase_username( $username, $raw_username, $strict ) { } add_filter( 'sanitize_user', 'lowercase_username', 10, 3 ); -function mu_upload_dir( $uploads ) { - $dir = $uploads[ 'basedir' ]; - if ( defined( 'BLOGUPLOADDIR' ) ) - $dir = constant( 'BLOGUPLOADDIR' ); - $dir = untrailingslashit( $dir ) . $uploads[ 'subdir' ]; - $uploads[ 'path' ] = $dir; - - return $uploads; -} -add_filter( 'upload_dir', 'mu_upload_dir' ); - function users_can_register_signup_filter() { $registration = get_site_option('registration'); if ( $registration == 'all' || $registration == 'user' )