From 13dc24e8e06b166475b9cbb3ca21aeaccec099f3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 4 Mar 2009 19:30:16 +0000 Subject: [PATCH] Nested install fixes. Props sivel. fixes #7997 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10698 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/setup-config.php | 4 ++-- wp-load.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 4b0b564998..00f1261f4c 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -42,8 +42,8 @@ if ( !is_writable('../')) if (file_exists('../wp-config.php')) wp_die("

The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

"); -// Check if wp-config.php exists above the root directory -if (file_exists('../../wp-config.php') && ! file_exists('../../wp-load.php')) +// Check if wp-config.php exists above the root directory but is not part of another install +if (file_exists('../../wp-config.php') && ! file_exists('../../wp-settings.php')) wp_die("

The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

"); if (isset($_GET['step'])) diff --git a/wp-load.php b/wp-load.php index 8e9768f8c3..d38a2ca308 100644 --- a/wp-load.php +++ b/wp-load.php @@ -26,9 +26,9 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { /** The config file resides in ABSPATH */ require_once( ABSPATH . 'wp-config.php' ); -} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-load.php' ) ) { +} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) { - /** The config file resides one level below ABSPATH */ + /** The config file resides one level above ABSPATH but is not part of another install*/ require_once( dirname(ABSPATH) . '/wp-config.php' ); } else {