diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-06-06 00:35:39 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-06-06 00:35:39 -0600 |
commit | 7cdcb5179f6d5414c9224fb65b7b36ab69ba52da (patch) | |
tree | ffc78236234505ca953870dc68ffb76fe0cae872 /modules/gallery/helpers/gallery_task.php | |
parent | c5425f42a4a13f7f585ffe45c070a865cdef6077 (diff) | |
parent | 329bd8caa126040ba7abaf28e8f76e0b6739ceff (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/gallery_task.php')
-rw-r--r-- | modules/gallery/helpers/gallery_task.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index 6046bfc4..2493c49e 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -46,14 +46,22 @@ class gallery_task_Core { */ static function rebuild_dirty_images($task) { $result = graphics::find_dirty_images_query(); - $remaining = $result->count(); $completed = $task->get("completed", 0); + $ignored = $task->get("ignored", array()); + $remaining = $result->count() - count($ignored); $i = 0; foreach ($result as $row) { + if (array_key_exists($row->id, $ignored)) { + continue; + } + $item = ORM::factory("item", $row->id); if ($item->loaded) { - graphics::generate($item); + $success = graphics::generate($item); + if (!$success) { + $ignored[$item->id] = 1; + } } $completed++; @@ -76,6 +84,7 @@ class gallery_task_Core { } $task->set("completed", $completed); + $task->set("ignored", $ignored); if ($remaining == 0) { $task->done = true; $task->state = "success"; |