diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-19 23:29:35 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-19 23:29:35 +0000 |
| commit | 45b6d344b4a5431e7cf11fde5808c63bf7553676 (patch) | |
| tree | 33a5bd2ee0124553c4d35f4152e607296479a551 /modules/gallery/helpers/gallery_event.php | |
| parent | d1475ec40ebda6404baab45b5b2482c651e657f9 (diff) | |
| parent | 21a0f832b66eaba902b09e2a88ece52c76e4a0c3 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_event.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index e3fa5e08..e048118b 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -124,6 +124,20 @@ class gallery_event_Core { } } + static function item_updated_data_file($item) { + graphics::generate($item); + + // Update any places where this is the album cover + foreach (ORM::factory("item") + ->where("album_cover_item_id", "=", $item->id) + ->find_all() as $target) { + copy($item->thumb_path(), $target->thumb_path()); + $target->thumb_width = $item->thumb_width; + $target->thumb_height = $item->thumb_height; + $target->save(); + } + } + static function batch_complete() { // Set the album covers for any items that where we probably deleted the album cover during // this batch. The item may have been deleted, so don't count on it being around. Choose the |
