summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/gallery_task.php8
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());