diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2013-01-31 15:48:18 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-31 15:48:18 -0800 |
| commit | cb08f6cc13bfd07aed2e6588cad6a6cc655b73f6 (patch) | |
| tree | 6c99c587e0fb6ee029773ea5690f9e92d28d4e9a /modules/gallery/helpers/gallery_event.php | |
| parent | 795f2569941f582127885f0bdcabe089d644a5d6 (diff) | |
| parent | f83ed5f8716663a45c9d8e8118bbcf0e2849c3fb (diff) | |
Merge pull request #115 from shadlaws/fix_1982
#1982 - Add placeholder for albums with no album cover.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_event.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index 4bbeccc2..aeb1c7eb 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -86,17 +86,17 @@ class gallery_event_Core { static function item_created($item) { access::add_item($item); - if ($item->is_photo() || $item->is_movie()) { - // Build our thumbnail/resizes. - try { - graphics::generate($item); - } catch (Exception $e) { - log::error("graphics", t("Couldn't create a thumbnail or resize for %item_title", - array("item_title" => $item->title)), - html::anchor($item->abs_url(), t("details"))); - Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); - } + // Build our thumbnail/resizes. + try { + graphics::generate($item); + } catch (Exception $e) { + log::error("graphics", t("Couldn't create a thumbnail or resize for %item_title", + array("item_title" => $item->title)), + html::anchor($item->abs_url(), t("details"))); + Kohana_Log::add("error", $e->getMessage() . "\n" . $e->getTraceAsString()); + } + if ($item->is_photo() || $item->is_movie()) { // If the parent has no cover item, make this it. $parent = $item->parent(); if (access::can("edit", $parent) && $parent->album_cover_item_id == null) { |
