restore shell wp-content/blogs.php & add deprecated warnings, props nacin, see #11742

git-svn-id: http://svn.automattic.com/wordpress/trunk@12977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-02-05 21:40:22 +00:00
parent e55a20f862
commit f3cae9b9d9
3 changed files with 30 additions and 8 deletions

17
wp-content/blogs.php Normal file
View File

@ -0,0 +1,17 @@
<?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' );
/* l10n is not loaded on SHORTINIT */
_deprecated_file( basename( __FILE__ ), '3.0', null, sprintf( 'Change your rewrite rules to use <code>%1$s</code> instead of <code>%2$s</code>.', 'wp-includes/ms-files.php', 'wp-content/blogs.php' ) );
/** Load Multisite upload handler. */
require_once( ABSPATH . WPINC . '/ms-files.php' );
?>

View File

@ -3071,24 +3071,26 @@ function _deprecated_function( $function, $version, $replacement=null ) {
* @access private
*
* @uses do_action() Calls 'deprecated_file_included' and passes the file name, what to use instead,
* and the version in which the file was deprecated.
* the version in which the file was deprecated, and any message regarding the change.
* @uses apply_filters() Calls 'deprecated_file_trigger_error' and expects boolean value of true to do
* trigger or false to not trigger error.
*
* @param string $file The file that was included
* @param string $version The version of WordPress that deprecated the file
* @param string $replacement Optional. The file that should have been included based on ABSPATH
* @param string $message Optional. A message regarding the change
*/
function _deprecated_file( $file, $version, $replacement = null ) {
function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {
do_action( 'deprecated_file_included', $file, $replacement, $version );
do_action( 'deprecated_file_included', $file, $replacement, $version, $message );
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) {
$message = empty( $message ) ? '' : ' ' . $message;
if ( ! is_null( $replacement ) )
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) );
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message );
else
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) );
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message );
}
}
/**

View File

@ -1,6 +1,6 @@
<?php
/**
* Load mulitsite uploaded media
* Multisite upload handler.
*
* @since 3.0.0
*
@ -8,8 +8,11 @@
* @subpackage Multisite
*/
if ( ! defined( 'SHORTINIT' ) ) {
define( 'SHORTINIT', true );
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
}
ms_default_constants( 'ms-files' );
error_reporting(0);