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