Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.330
diff -u -p -r1.330 bootstrap.inc
--- includes/bootstrap.inc	22 Nov 2009 08:20:51 -0000	1.330
+++ includes/bootstrap.inc	1 Dec 2009 13:34:38 -0000
@@ -1459,14 +1459,10 @@ function drupal_anonymous_user($session 
  *
  * @param $phase
  *   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).
  * @return
  *   The most recently completed phase.
- *
  */
-function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
+function drupal_bootstrap($phase = NULL) {
   // Not drupal_static(), because does not depend on any run-time information.
   static $phases = array(
     DRUPAL_BOOTSTRAP_CONFIGURATION,
@@ -1478,22 +1474,14 @@ function drupal_bootstrap($phase = NULL,
     DRUPAL_BOOTSTRAP_LANGUAGE,
     DRUPAL_BOOTSTRAP_FULL,
   );
-  // 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.
-    while ($phases && $phase > $completed_phase && $final_phase > $completed_phase) {
+    while ($phases && $phase > $completed_phase) {
       $current_phase = array_shift($phases);
       switch ($current_phase) {
         case DRUPAL_BOOTSTRAP_CONFIGURATION:
@@ -1530,11 +1518,6 @@ function drupal_bootstrap($phase = NULL,
           _drupal_bootstrap_full();
           break;
       }
-      // This function is reentrant. Only update the completed phase when the
-      // current call actually resulted in a progress in the bootstrap process.
-      if ($current_phase > $completed_phase) {
-        $completed_phase = $current_phase;
-      }
     }
   }
   return $completed_phase;
