Skip to content
Snippets Groups Projects
Commit d92389ae authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #583008 by Damien Tournoud: DRUPAL_BOOTSTRAP_ACCESS doesn't exist...

- Patch #583008 by Damien Tournoud: DRUPAL_BOOTSTRAP_ACCESS doesn't exist anymore, but is still an explicit bootstrap step.
parent 1eea0b54
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -107,40 +107,35 @@
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).
......
......@@ -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;
}
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment