diff options
-rw-r--r-- | install.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/install.php b/install.php index 4ec0cb55a..1657e3158 100644 --- a/install.php +++ b/install.php @@ -16,16 +16,9 @@ require_once './includes/install.inc'; */ function install_main() { global $profile, $install_locale, $conf; - require_once './includes/cache-install.inc'; require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); - // Because no persistent storage is available yet, functions - // that check for cached data will fail. During the installation - // process, we temporarily replace the normal cache system with - // a stubbed-out version that short-circuits the actual caching - // process and avoids any errors. - $conf['cache_inc'] = './includes/cache-install.inc'; require_once './modules/system/system.install'; require_once './includes/file.inc'; @@ -36,9 +29,16 @@ function install_main() { $verify = install_verify_settings(); if ($verify) { + // Since we have a database connection, we use the normal cache system. + // This is important, as the installer calls into the Drupal system for + // the clean URL checks, so we should maintain the cache properly. + require_once './includes/cache.inc'; + $conf['cache_inc'] = './includes/cache.inc'; + // Establish a connection to the database. require_once './includes/database.inc'; db_set_active(); + // Check if Drupal is installed. $task = install_verify_drupal(); if ($task == 'done') { @@ -46,6 +46,13 @@ function install_main() { } } else { + // Since no persistent storage is available yet, and functions that check + // for cached data will fail, we temporarily replace the normal cache + // system with a stubbed-out version that short-circuits the actual + // caching process and avoids any errors. + require_once './includes/cache-install.inc'; + $conf['cache_inc'] = './includes/cache-install.inc'; + $task = NULL; } |