diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-07-27 21:35:14 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-07-27 21:35:14 -0700 |
| commit | c3a92df6e6ee88c9fd57c3da8a6703d994cb55b2 (patch) | |
| tree | 47c7fbefb7d979bd47ca660cb3f5becbf4f5c75d /modules/gallery/helpers/item.php | |
| parent | c2100d1d2d7d4a5570ed454f5de078d6595de768 (diff) | |
| parent | dd955781aaa9c1ee9e780b6b2c545878a47bbf21 (diff) | |
Merge branch 'master' into dialog
Diffstat (limited to 'modules/gallery/helpers/item.php')
| -rw-r--r-- | modules/gallery/helpers/item.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index 8fea49cc..092904a5 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -105,9 +105,15 @@ class item_Core { model_cache::clear(); $parent->album_cover_item_id = $item->is_album() ? $item->album_cover_item_id : $item->id; - $parent->thumb_dirty = 1; + if ($item->thumb_dirty) { + $parent->thumb_dirty = 1; + graphics::generate($parent); + } else { + copy($item->thumb_path(), $parent->thumb_path()); + $parent->thumb_width = $item->thumb_width; + $parent->thumb_height = $item->thumb_height; + } $parent->save(); - graphics::generate($parent); $grand_parent = $parent->parent(); if ($grand_parent && access::can("edit", $grand_parent) && $grand_parent->album_cover_item_id == null) { |
