diff options
Diffstat (limited to 'wp-settings.php')
-rw-r--r-- | wp-settings.php | 24 |
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; |