summaryrefslogtreecommitdiffstats
path: root/wp-settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-settings.php')
-rw-r--r--wp-settings.php27
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" ) )