summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-11-21 14:06:46 +0000
committerDries Buytaert <dries@buytaert.net>2009-11-21 14:06:46 +0000
commit63f39bedf6a7b3a8c8d4a9427d332a67bba2acdf (patch)
treeea1a5e19e313000f644ecf3cf858e69bbc2eb967 /includes/bootstrap.inc
parentdc22c73a9001708805a29da69dd5c809ffb70f25 (diff)
downloadbrdo-63f39bedf6a7b3a8c8d4a9427d332a67bba2acdf.tar.gz
brdo-63f39bedf6a7b3a8c8d4a9427d332a67bba2acdf.tar.bz2
- Patch #634440 by fago, effulgentsia, sun: remove auto-rebuilding magic for ()['storage'].
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc23
1 files changed, 14 insertions, 9 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index f0a5ec12a..8c043378e 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1465,13 +1465,8 @@ function drupal_anonymous_user($session = '') {
*
*/
function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
- $final_phase = &drupal_static(__FUNCTION__ . '_final_phase');
- // When not recursing, store the phase name so it's not forgotten while
- // recursing.
- if ($new_phase) {
- $final_phase = $phase;
- }
- $phases = &drupal_static(__FUNCTION__ . '_phases', array(
+ // Not drupal_static(), because does not depend on any run-time information.
+ static $phases = array(
DRUPAL_BOOTSTRAP_CONFIGURATION,
DRUPAL_BOOTSTRAP_PAGE_CACHE,
DRUPAL_BOOTSTRAP_DATABASE,
@@ -1480,9 +1475,19 @@ function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
DRUPAL_BOOTSTRAP_PAGE_HEADER,
DRUPAL_BOOTSTRAP_LANGUAGE,
DRUPAL_BOOTSTRAP_FULL,
- ));
- $completed_phase = &drupal_static(__FUNCTION__ . '_completed_phase', -1);
+ );
+ // Not drupal_static(), because the only legitimate API to control this is to
+ // call drupal_bootstrap() with a new phase parameter.
+ static $final_phase;
+ // Not drupal_static(), because it's impossible to roll back to an earlier
+ // bootstrap state.
+ static $completed_phase = -1;
+ // When not recursing, store the phase name so it's not forgotten while
+ // recursing.
+ if ($new_phase) {
+ $final_phase = $phase;
+ }
if (isset($phase)) {
// Call a phase if it has not been called before and is below the requested
// phase.