summaryrefslogtreecommitdiffstats
path: root/wp-settings.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-23 18:28:40 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-23 18:28:40 +0000
commit87bb8cd69cc593fe6bed330fb1791eac9df87167 (patch)
tree6b2ad252df89d2a1863198fd44b321b59e42ef54 /wp-settings.php
parent0cbda3349a2571904ea063fdd73e018299919589 (diff)
downloadwordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.gz
wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.xz
wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.zip
Merge with WordPress, rev 6285 and untested
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1125 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-settings.php')
-rw-r--r--wp-settings.php24
1 files changed, 11 insertions, 13 deletions
diff --git a/wp-settings.php b/wp-settings.php
index 8636bde..f790af8 100644
--- a/wp-settings.php
+++ b/wp-settings.php
@@ -44,12 +44,10 @@ if ( empty( $_SERVER['REQUEST_URI'] ) ) {
else if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}
- 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)
+ 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'] )
$_SERVER['REQUEST_URI'] = $_SERVER['PATH_INFO'];
else
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . $_SERVER['PATH_INFO'];
@@ -103,8 +101,12 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
}
timer_start();
-// Change to E_ALL for development/debugging
-error_reporting(E_ALL ^ E_NOTICE);
+// 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);
+}
// For an advanced caching plugin to use, static because you would only want one
if ( defined('WP_CACHE') )
@@ -125,11 +127,7 @@ if ( !defined('PLUGINDIR') )
require (ABSPATH . WPINC . '/compat.php');
require (ABSPATH . WPINC . '/functions.php');
-if ( file_exists(ABSPATH . 'wp-content/db.php') )
- require_once (ABSPATH . 'wp-content/db.php');
-else
- require_once (ABSPATH . WPINC . '/wp-db.php');
-
+require_wp_db();
// $table_prefix is deprecated as of 2.1
$wpdb->prefix = $table_prefix;