summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/data_rest.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/data_rest.php')
-rw-r--r--modules/gallery/helpers/data_rest.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/gallery/helpers/data_rest.php b/modules/gallery/helpers/data_rest.php
index abd4638e..ef4f17e7 100644
--- a/modules/gallery/helpers/data_rest.php
+++ b/modules/gallery/helpers/data_rest.php
@@ -57,13 +57,11 @@ class data_rest_Core {
return;
}
- // Dump out the image. If the item is a movie, then its thumbnail will be a JPG.
- if ($item->is_movie() && $p->size == "thumb") {
+ // Dump out the image. If the item is a movie or album, then its thumbnail will be a JPG.
+ if (($item->is_movie() || $item->is_album()) && $p->size == "thumb") {
header("Content-Type: image/jpeg");
- } else if ($item->is_album()) {
- header("Content-Type: " . $item->album_cover()->mime_type);
} else {
- header("Content-Type: {$item->mime_type}");
+ header("Content-Type: $item->mime_type");
}
Kohana::close_buffers(false);