summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/item.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-27 21:35:14 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-07-27 21:35:14 -0700
commitc3a92df6e6ee88c9fd57c3da8a6703d994cb55b2 (patch)
tree47c7fbefb7d979bd47ca660cb3f5becbf4f5c75d /modules/gallery/helpers/item.php
parentc2100d1d2d7d4a5570ed454f5de078d6595de768 (diff)
parentdd955781aaa9c1ee9e780b6b2c545878a47bbf21 (diff)
Merge branch 'master' into dialog
Diffstat (limited to 'modules/gallery/helpers/item.php')
-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) {