summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-26 16:12:09 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-26 16:12:09 +0000
commitc3fcd3a79bd2f171b15384ea0ff44677b0c7a730 (patch)
treefd260cd8a557e7475ec724ff2e82dcfd763bd8cb
parent63b3b505c1111e2987e00113364a25bd27601192 (diff)
Fix thumbnail and resize generation for photos. the variable $type had
never been set, so it was never equal to "photo" so no thumbnails were generated.
-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;