diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-27 20:31:56 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-27 20:31:56 -0700 |
commit | ab5e680265dfe9c42bd4d6fb8d1d9fccd95eed7b (patch) | |
tree | 87801f197edb4a06ab977e868e70b506d533edad /modules | |
parent | c97a88599eb7b199294edbfae382353456061bef (diff) |
Clean up the task initialization for rebuild thumbs and resizes.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/helpers/gallery_task.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 3d0476a8..1ff26c35 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -48,11 +48,13 @@ class gallery_task_Core { $errors = array(); try { $result = graphics::find_dirty_images_query(); - $total_count = $task->get("total_count", -1); - if ($total_count < 0) { - $total_count = $result->count(); + $total_count = $task->get("total_count", $result->count()); + $mode = $task->get("mode", "init"); + if ($mode == "init") { $task->set("total_count", $total_count); + $task->get("mode", "process"); } + $completed = $task->get("completed", 0); $ignored = $task->get("ignored", array()); |