summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-10-05 14:48:49 +0000
committerDries Buytaert <dries@buytaert.net>2007-10-05 14:48:49 +0000
commit821221cc14468433095a43bbd26b2ad1c0b6d235 (patch)
treec73eef30c72fc082f3a29882323f74d572145c2b
parent39706e3c51cf206ca6669bbb7a090d2f7d394591 (diff)
downloadbrdo-821221cc14468433095a43bbd26b2ad1c0b6d235.tar.gz
brdo-821221cc14468433095a43bbd26b2ad1c0b6d235.tar.bz2
- Patch #181063 by chx: fixed problem with drupal_bootstrap() not booting to the proper level.
-rw-r--r--includes/bootstrap.inc13
1 files changed, 2 insertions, 11 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index a638f533d..36d9df5da 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -867,19 +867,10 @@ function drupal_anonymous_user($session = '') {
function drupal_bootstrap($phase) {
static $phases = array(DRUPAL_BOOTSTRAP_CONFIGURATION, DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE, DRUPAL_BOOTSTRAP_DATABASE, DRUPAL_BOOTSTRAP_ACCESS, DRUPAL_BOOTSTRAP_SESSION, DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE, DRUPAL_BOOTSTRAP_LANGUAGE, DRUPAL_BOOTSTRAP_PATH, DRUPAL_BOOTSTRAP_FULL), $phase_index = 0;
- // Stop early if $phase was already executed.
- if ($phase < $phase_index) {
- return;
- }
-
- while (!empty($phases)) {
+ while ($phase >= $phase_index && isset($phases[$phase_index])) {
$current_phase = $phases[$phase_index];
- unset($phases[$phase_index]);
+ unset($phases[$phase_index++]);
_drupal_bootstrap($current_phase);
- $phase_index++;
- if ($phase == $current_phase) {
- return;
- }
}
}