From 01d4f4f18c95318d780d07e9a22727f09e03b10f Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 28 Feb 2010 20:29:24 +0000 Subject: [PATCH] Remove wp-content/blogs.php and add deprecated warning for MU admins. fixes #11742 git-svn-id: http://svn.automattic.com/wordpress/trunk@13514 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/ms.php | 12 ++++++++++-- wp-content/blogs.php | 15 --------------- wp-includes/ms-files.php | 8 +++----- 3 files changed, 13 insertions(+), 22 deletions(-) delete mode 100644 wp-content/blogs.php diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 2a67c7cf1..f07c85bde 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -771,9 +771,8 @@ function stripslashes_from_options( $blog_id ) { add_action( 'wpmu_upgrade_site', 'stripslashes_from_options' ); function show_post_thumbnail_warning() { - if ( false == is_super_admin() ) { + if ( ! is_super_admin() ) return; - } $mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); if ( empty($mu_media_buttons[ 'image' ]) && current_theme_supports( 'post-thumbnails' ) ) { echo "
" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on the options page for it to work." ), admin_url( 'ms-options.php' ) ) . "
"; @@ -781,4 +780,13 @@ function show_post_thumbnail_warning() { } add_action( 'admin_notices', 'show_post_thumbnail_warning' ); +function ms_deprecated_blogs_file() { + if ( ! is_super_admin() ) + return; + if ( ! file_exists( WP_CONTENT_DIR . '/blogs.php' ) ) + return; + echo '
' . sprintf( __( 'The %1$s file is deprecated. Please remove it and update your server rewrite rules to use %2$s instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '
'; +} +add_action( 'admin_notices', 'ms_deprecated_blogs_file' ); + ?> diff --git a/wp-content/blogs.php b/wp-content/blogs.php deleted file mode 100644 index a4235b167..000000000 --- a/wp-content/blogs.php +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php index 7362619ae..cb73749f5 100644 --- a/wp-includes/ms-files.php +++ b/wp-includes/ms-files.php @@ -8,12 +8,10 @@ * @subpackage Multisite */ -if ( ! defined( 'SHORTINIT' ) ) { - define( 'SHORTINIT', true ); - require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); -} +define( 'SHORTINIT', true ); +require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); -ms_file_constants( ); +ms_file_constants(); error_reporting( 0 );