Mercurial > hg > isophonics-drupal-site
diff core/includes/batch.inc @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/includes/batch.inc Thu Feb 28 13:21:36 2019 +0000 +++ b/core/includes/batch.inc Thu May 09 15:33:08 2019 +0100 @@ -43,7 +43,7 @@ $batch = \Drupal::service('batch.storage')->load($request_id); if (!$batch) { \Drupal::messenger()->addError(t('No active batch.')); - return new RedirectResponse(\Drupal::url('<front>', [], ['absolute' => TRUE])); + return new RedirectResponse(Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString()); } } @@ -253,6 +253,7 @@ $current_set = &_batch_current_set(); // Indicate that this batch set needs to be initialized. $set_changed = TRUE; + $task_message = ''; // If this batch was marked for progressive execution (e.g. forms submitted by // \Drupal::formBuilder()->submitForm(), initialize a timer to determine @@ -276,7 +277,7 @@ include_once \Drupal::root() . '/' . $current_set['file']; } - $task_message = $label = ''; + $task_message = ''; // Assume a single pass operation and set the completion level to 1 by // default. $finished = 1; @@ -364,11 +365,8 @@ '@estimate' => ($current > 0) ? \Drupal::service('date.formatter')->formatInterval(($elapsed * ($total - $current) / $current) / 1000) : '-', ]; $message = strtr($progress_message, $values); - if (!empty($task_message)) { - $label = $task_message; - } - return [$percentage, $message, $label]; + return [$percentage, $message, $task_message]; } else { // If we are not in progressive mode, the entire batch has been processed.