diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-09-21 08:07:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-09-21 08:07:07 +0000 |
commit | d92389ae1146f3142e4e10907dd801351d470ef8 (patch) | |
tree | aacd4eb77c85c86c5b736656553adcdbacf31c5c | |
parent | 1eea0b5496d2e13afc0b66d58add5fac9956cc7b (diff) | |
download | brdo-d92389ae1146f3142e4e10907dd801351d470ef8.tar.gz brdo-d92389ae1146f3142e4e10907dd801351d470ef8.tar.bz2 |
- Patch #583008 by Damien Tournoud: DRUPAL_BOOTSTRAP_ACCESS doesn't exist anymore, but is still an explicit bootstrap step.
-rw-r--r-- | includes/bootstrap.inc | 40 | ||||
-rw-r--r-- | includes/update.inc | 19 |
2 files changed, 19 insertions, 40 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 18a370923..f2776bb21 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -107,40 +107,35 @@ define('DRUPAL_BOOTSTRAP_PAGE_CACHE', 1); define('DRUPAL_BOOTSTRAP_DATABASE', 2); /** - * Fourth bootstrap phase: identify and reject banned hosts. + * Fourth bootstrap phase: initialize the variable system. */ -define('DRUPAL_BOOTSTRAP_ACCESS', 3); +define('DRUPAL_BOOTSTRAP_VARIABLES', 3); /** - * Fifth bootstrap phase: initialize the variable system. + * Fifth bootstrap phase: initialize session handling. */ -define('DRUPAL_BOOTSTRAP_VARIABLES', 4); +define('DRUPAL_BOOTSTRAP_SESSION', 4); /** - * Sixth bootstrap phase: initialize session handling. + * Sixth bootstrap phase: set up the page header. */ -define('DRUPAL_BOOTSTRAP_SESSION', 5); +define('DRUPAL_BOOTSTRAP_PAGE_HEADER', 5); /** - * Seventh bootstrap phase: set up the page header. + * Seventh bootstrap phase: find out language of the page. */ -define('DRUPAL_BOOTSTRAP_PAGE_HEADER', 6); +define('DRUPAL_BOOTSTRAP_LANGUAGE', 6); /** - * Eighth bootstrap phase: find out language of the page. + * Eighth bootstrap phase: set $_GET['q'] to Drupal path of request. */ -define('DRUPAL_BOOTSTRAP_LANGUAGE', 7); - -/** - * Ninth bootstrap phase: set $_GET['q'] to Drupal path of request. - */ -define('DRUPAL_BOOTSTRAP_PATH', 8); +define('DRUPAL_BOOTSTRAP_PATH', 7); /** * Final bootstrap phase: Drupal is fully loaded; validate and fix * input data. */ -define('DRUPAL_BOOTSTRAP_FULL', 9); +define('DRUPAL_BOOTSTRAP_FULL', 8); /** * Role ID for anonymous users; should match what's in the "role" table. @@ -1389,18 +1384,7 @@ function drupal_anonymous_user($session = '') { * include bootstrap.inc, and call drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE). * * @param $phase - * A constant. Allowed values are: - * DRUPAL_BOOTSTRAP_CONFIGURATION: initialize configuration. - * DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE: try to call a non-database cache fetch routine. - * DRUPAL_BOOTSTRAP_DATABASE: initialize database layer. - * DRUPAL_BOOTSTRAP_ACCESS: identify and reject banned hosts. - * DRUPAL_BOOTSTRAP_SESSION: initialize session handling. - * DRUPAL_BOOTSTRAP_VARIABLES: initialize variable handling. - * DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE: load bootstrap.inc and module.inc, start - * the variable system and try to serve a page from the cache. - * DRUPAL_BOOTSTRAP_LANGUAGE: identify the language used on the page. - * DRUPAL_BOOTSTRAP_PATH: set $_GET['q'] to Drupal path of request. - * DRUPAL_BOOTSTRAP_FULL: Drupal is fully loaded, validate and fix input data. + * A constant. Allowed values are the DRUPAL_BOOTSTRAP_* constants. * @param $new_phase * A boolean, set to FALSE if calling drupal_bootstrap from inside a * function called from drupal_bootstrap (recursion). diff --git a/includes/update.inc b/includes/update.inc index 44e246757..f8a885531 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -87,24 +87,19 @@ function update_prepare_d7_bootstrap() { ); update_extra_requirements($requirements); } + + // The new {blocked_ips} table is used in Drupal 7 to store a list of + // banned IP addresses. If this table doesn't exist then we are still + // running on a Drupal 6 database, so we suppress the unavoidable errors + // that occur by creating a static list. + $GLOBALS['conf']['blocked_ips'] = array(); + // Allow the database system to work even if the registry has not been // created yet. drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE); drupal_install_initialize_database(); spl_autoload_unregister('drupal_autoload_class'); spl_autoload_unregister('drupal_autoload_interface'); - // The new {blocked_ips} table is used in Drupal 7 to store a list of - // banned IP addresses. If this table doesn't exist then we are still - // running on a Drupal 6 database, so suppress the unavoidable errors - // that occur. - try { - drupal_bootstrap(DRUPAL_BOOTSTRAP_ACCESS); - } - catch (Exception $e) { - if (db_table_exists('blocked_ips')) { - throw $e; - } - } } /** |