summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/helpers/photo.php18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/helpers/photo.php b/core/helpers/photo.php
index 7664e2d0..423c1973 100644
--- a/core/helpers/photo.php
+++ b/core/helpers/photo.php
@@ -85,17 +85,15 @@ class photo_Core {
module::event("item_created", $photo);
- if ($type == "photo") {
- // Build our thumbnail/resizes
- graphics::generate($photo);
+ // Build our thumbnail/resizes
+ graphics::generate($photo);
- // If the parent has no cover item, make this it.
- $parent = $photo->parent();
- if ($parent->album_cover_item_id == null) {
- $parent->album_cover_item_id = $photo->id;
- $parent->save();
- graphics::generate($parent);
- }
+ // If the parent has no cover item, make this it.
+ $parent = $photo->parent();
+ if ($parent->album_cover_item_id == null) {
+ $parent->album_cover_item_id = $photo->id;
+ $parent->save();
+ graphics::generate($parent);
}
return $photo;