diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-30 16:49:38 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-30 16:49:38 +0000 |
commit | d85d717aedbc7690e2a450e40dab8fcebd94b38c (patch) | |
tree | a7340a14bb1192e977fca4f26beef29869e17579 /wp-settings.php | |
parent | 9817ff2d282c68faaa09232845829b96f207e72b (diff) | |
download | wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.tar.gz wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.tar.xz wordpress-mu-d85d717aedbc7690e2a450e40dab8fcebd94b38c.zip |
Merge with WordPress 2.3.1
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1139 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-settings.php')
-rw-r--r-- | wp-settings.php | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/wp-settings.php b/wp-settings.php index 442fe50..ccd127b 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -44,10 +44,12 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) { else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL']; } - else - { - // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) - if ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) + else { + // If root then simulate that no script-name was specified + if (empty($_SERVER['PATH_INFO'])) + $_SERVER['REQUEST_URI'] = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')) . '/'; + elseif ( $_SERVER['PATH_INFO'] == $_SERVER['SCRIPT_NAME'] ) + // Some IIS + PHP configurations puts the script-name in the path-info (No need to append it twice) $_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO']; else $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO']; @@ -101,12 +103,8 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop( } timer_start(); -// Add define('WP_DEBUG',true); to wp-config.php to enable display of notices during development. -if (defined('WP_DEBUG') and WP_DEBUG == true) { - error_reporting(E_ALL); -} else { - error_reporting(E_ALL ^ E_NOTICE); -} +// Change to E_ALL for development/debugging +error_reporting(E_ALL ^ E_NOTICE); // For an advanced caching plugin to use, static because you would only want one if ( defined('WP_CACHE') ) @@ -127,7 +125,11 @@ if ( !defined('PLUGINDIR') ) require (ABSPATH . WPINC . '/compat.php'); require (ABSPATH . WPINC . '/functions.php'); -require_wp_db(); +if ( file_exists(ABSPATH . 'wp-content/db.php') ) + require_once (ABSPATH . 'wp-content/db.php'); +else + require_once (ABSPATH . WPINC . '/wp-db.php'); + // $table_prefix is deprecated as of 2.1 $wpdb->prefix = $wpdb->base_prefix = $table_prefix; @@ -178,9 +180,6 @@ if ( file_exists(ABSPATH . 'wp-content/object-cache.php') ) else require_once (ABSPATH . WPINC . '/cache.php'); -// To disable persistant caching, add the below line to your wp-config.php file, uncommented of course. -// define('DISABLE_CACHE', true); - wp_cache_init(); if( !defined( "UPLOADS" ) ) |