From e30516b2ee40c1c45c8f288c20a3d4372e478624 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 8 Sep 2006 10:57:32 +0000 Subject: WP Merge to #4124 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@734 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-settings.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'wp-settings.php') diff --git a/wp-settings.php b/wp-settings.php index a79773a..c02e019 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -62,6 +62,18 @@ function timer_start() { $timestart = $mtime; return true; } + +function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(1), will echo $timetotal + global $timestart, $timeend; + $mtime = microtime(); + $mtime = explode(' ',$mtime); + $mtime = $mtime[1] + $mtime[0]; + $timeend = $mtime; + $timetotal = $timeend-$timestart; + if ( $display ) + echo number_format($timetotal,$precision); + return $timetotal; +} timer_start(); // Change to E_ALL for development/debugging @@ -72,7 +84,10 @@ if ( defined('WP_CACHE') ) require (ABSPATH . 'wp-content/advanced-cache.php'); define('WPINC', 'wp-includes'); -require_once (ABSPATH . WPINC . '/wp-db.php'); +if ( file_exists(ABSPATH . 'wp-content/db.php') ) + require (ABSPATH . 'wp-content/db.php'); +else + require_once (ABSPATH . WPINC . '/wp-db.php'); // Table names $wpdb->blogs = $table_prefix . 'blogs'; @@ -134,7 +149,7 @@ if ( !$db_check && (!strstr($_SERVER['PHP_SELF'], 'install.php') && !defined('WP $link = 'install.php'; else $link = 'wp-admin/install.php'; - die(sprintf(__("It doesn't look like you've installed WP yet. Try running install.php."), $link)); + wp_die(sprintf(__("It doesn't look like you've installed WP yet. Try running install.php."), $link)); } $wpdb->show_errors(); -- cgit