Commit 15911a08 authored by Dries's avatar Dries
Browse files

- Patch #270045 by yched: partial revert for batch API.

parent f771318c
......@@ -179,8 +179,10 @@ function _batch_process() {
include_once($current_set['file']);
}
$finished = TRUE;
$task_message = '';
// We assume a single pass operation and set the completion level
// to 1 by default.
$finished = 1;
if ((list($function, $args) = reset($current_set['operations'])) && function_exists($function)) {
// Build the 'context' array, execute the function call,
// and retrieve the user message.
......@@ -189,9 +191,9 @@ function _batch_process() {
call_user_func_array($function, array_merge($args, array(&$batch_context)));
}
if ($finished == TRUE) {
if ($finished == 1) {
// Make sure this step isn't counted double when computing $current.
$finished = FALSE;
$finished = 0;
// Remove the operation and clear the sandbox.
array_shift($current_set['operations']);
$current_set['sandbox'] = array();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment