summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-26 14:32:04 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-26 14:32:04 -0700
commite496e5f6bfa943a0f7e663c94d97bf071f61153d (patch)
tree30d7efaaf4d8ff47a378a4e9ea65f72e448fbb72
parentcb3d619b06ce8c72e5e69d3a3d360ef5b759e3b1 (diff)
When rebuilding dirty images, start a batch on initialization and stop it when the task is complete. Fixes ticket #670
-rw-r--r--modules/gallery/helpers/gallery_task.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php
index 1ff26c35..95216cf0 100644
--- a/modules/gallery/helpers/gallery_task.php
+++ b/modules/gallery/helpers/gallery_task.php
@@ -52,7 +52,8 @@ class gallery_task_Core {
$mode = $task->get("mode", "init");
if ($mode == "init") {
$task->set("total_count", $total_count);
- $task->get("mode", "process");
+ $task->set("mode", "process");
+ batch::start();
}
$completed = $task->get("completed", 0);
@@ -101,6 +102,7 @@ class gallery_task_Core {
if ($task->percent_complete == 100) {
$task->done = true;
$task->state = "success";
+ batch::stop();
site_status::clear("graphics_dirty");
}
} catch (Exception $e) {