mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-23 07:15:50 -04:00
Clean up the task initialization for rebuild thumbs and resizes.
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user