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
This commit is contained in:
nacin 2010-02-28 20:29:24 +00:00
parent 2a3564c8ad
commit 01d4f4f18c
3 changed files with 13 additions and 22 deletions

View File

@ -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 "<div id='update-nag'>" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>";
@ -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 '<div id="update-nag">' . sprintf( __( 'The <code>%1$s</code> file is deprecated. Please remove it and update your server rewrite rules to use <code>%2$s</code> instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '</div>';
}
add_action( 'admin_notices', 'ms_deprecated_blogs_file' );
?>

View File

@ -1,15 +0,0 @@
<?php
/**
* Deprecated. Update your .htaccess file to use wp-includes/ms-files.php instead.
*
* @package WordPress
* @subpackage Multisite
*/
define( 'SHORTINIT', true );
require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' );
/** Load Multisite upload handler. */
require_once( ABSPATH . WPINC . '/ms-files.php' );
?>

View File

@ -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 );