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

git-svn-id: https://develop.svn.wordpress.org/trunk@2171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-01-31 10:28:53 +00:00
parent 4c65eff661
commit 72f9ff6ec0
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');
$wpdb->hide_errors();
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 ( !update_user_cache() && !strstr($_SERVER['PHP_SELF'], 'install.php') ) {
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();
require (ABSPATH . WPINC . '/functions-formatting.php');