Move database class loading to a shared function to ensure all of WordPress is wp-content/wp-db.php aware. Fixes #5128 props ComputerGuru.

git-svn-id: https://develop.svn.wordpress.org/trunk@6198 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2007-10-06 08:18:33 +00:00
parent 3c2cc79a46
commit 0919b3ca32
3 changed files with 22 additions and 6 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
<?php
define('WP_INSTALLING', true);
//These two defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware
define('ABSPATH', dirname(dirname(__FILE__)).'/');
define('WPINC', 'wp-includes');
require_once('../wp-includes/compat.php');
require_once('../wp-includes/functions.php');
@@ -160,7 +163,7 @@ switch($step) {
define('DB_HOST', $dbhost);
// We'll fail here if the values are no good.
require_once('../wp-includes/wp-db.php');
require_wp_db();
$handle = fopen('../wp-config.php', 'w');
foreach ($configFile as $line_num => $line) {