If we're already in wp-admin don't recursive link

git-svn-id: http://svn.automattic.com/wordpress/trunk@2171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2005-01-31 10:28:53 +00:00
parent 85c19d30c2
commit ca2815fb70
1 changed files with 7 additions and 2 deletions

View File

@ -61,8 +61,13 @@ require (ABSPATH . WPINC . '/functions.php');
require_once (ABSPATH . WPINC . '/wp-l10n.php'); require_once (ABSPATH . WPINC . '/wp-l10n.php');
$wpdb->hide_errors(); $wpdb->hide_errors();
if ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') ) if ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') ) {
die("It doesn't look like you've installed WP yet. Try running <a href='wp-admin/install.php'>install.php</a>."); if ( strstr($_SERVER['PHP_SELF'], 'wp-admin') )
$link = 'install.php';
else
$link = 'wp-admin/install.php';
die("It doesn't look like you've installed WP yet. Try running <a href='$link'>install.php</a>.");
}
$wpdb->show_errors(); $wpdb->show_errors();
require (ABSPATH . WPINC . '/functions-formatting.php'); require (ABSPATH . WPINC . '/functions-formatting.php');