summaryrefslogtreecommitdiffstats
path: root/wp-settings.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-08 10:57:32 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-09-08 10:57:32 +0000
commite30516b2ee40c1c45c8f288c20a3d4372e478624 (patch)
treebd6b8bcc4c06697f50e6985a6b08620e25bc572e /wp-settings.php
parente20c9aa016d6885c6e3fc7425525b4090f05ac2a (diff)
downloadwordpress-mu-e30516b2ee40c1c45c8f288c20a3d4372e478624.tar.gz
wordpress-mu-e30516b2ee40c1c45c8f288c20a3d4372e478624.tar.xz
wordpress-mu-e30516b2ee40c1c45c8f288c20a3d4372e478624.zip
WP Merge to #4124
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@734 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-settings.php')
-rw-r--r--wp-settings.php19
1 files changed, 17 insertions, 2 deletions
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 <a href='%s'>install.php</a>."), $link));
+ wp_die(sprintf(__("It doesn't look like you've installed WP yet. Try running <a href='%s'>install.php</a>."), $link));
}
$wpdb->show_errors();