diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-26 14:32:04 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-27 07:35:33 -0700 |
commit | ca372213373ac91c3099f049bbe9686eb9426acb (patch) | |
tree | c80d60284965e2eb13b9f7f15ebac8c0cae5d392 /modules/gallery/helpers/gallery_task.php | |
parent | 2dcd8f8a25fc698f2279a09752cc7bb9dfe1d7ec (diff) |
When rebuilding dirty images, start a batch on initialization and stop it when the task is complete. Fixes ticket #670
Diffstat (limited to 'modules/gallery/helpers/gallery_task.php')
-rw-r--r-- | modules/gallery/helpers/gallery_task.php | 4 |
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) { |