diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-06-21 18:24:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-06-21 18:24:20 +0000 |
commit | 15911a081088e5a82c4d746f168a6bc8f0268755 (patch) | |
tree | 0f266c107dba5216b1434d249691bd2c5a7dfa42 | |
parent | f771318c515dfb5fa7ed15d0c931ee757414b3a4 (diff) | |
download | brdo-15911a081088e5a82c4d746f168a6bc8f0268755.tar.gz brdo-15911a081088e5a82c4d746f168a6bc8f0268755.tar.bz2 |
- Patch #270045 by yched: partial revert for batch API.
-rw-r--r-- | includes/batch.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/batch.inc b/includes/batch.inc index c489f9301..22692f0ad 100644 --- a/includes/batch.inc +++ b/includes/batch.inc @@ -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(); |