From e496e5f6bfa943a0f7e663c94d97bf071f61153d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 26 Oct 2009 14:32:04 -0700 Subject: When rebuilding dirty images, start a batch on initialization and stop it when the task is complete. Fixes ticket #670 --- modules/gallery/helpers/gallery_task.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') 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) { -- cgit v1.2.3