aboutsummaryrefslogtreecommitdiff
path: root/thumbnail.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-05-09 22:22:51 +0000
committerCash Costello <cash.costello@gmail.com>2009-05-09 22:22:51 +0000
commitfe1cce6c8cbf2ee781619ff21b571518aa1a28e9 (patch)
treefb56119f6ddd36fd24b7aeae99925158ecde1574 /thumbnail.php
parent9df7b2f7875d6c26d02d398d17f5fade118673ca (diff)
downloadelgg-fe1cce6c8cbf2ee781619ff21b571518aa1a28e9.tar.gz
elgg-fe1cce6c8cbf2ee781619ff21b571518aa1a28e9.tar.bz2
started adding images to activity river
Diffstat (limited to 'thumbnail.php')
-rw-r--r--thumbnail.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/thumbnail.php b/thumbnail.php
index b4c745ae2..fe8ca8bab 100644
--- a/thumbnail.php
+++ b/thumbnail.php
@@ -13,15 +13,17 @@
// Get file thumbnail size
$size = get_input('size','small');
- if ($size != 'small') {
+ if ($size != 'small' && $size != 'thumb') {
$size = 'large';
}
// Get file entity
if ($file = get_entity($file_guid)) {
- if ($file->getSubtype() == "image") {
+ if ($file->getSubtype() == "image") {
// Get file thumbnail
- if ($size == "small") {
+ if ($size === "thumb") {
+ $thumbfile = $file->thumbnail;
+ } else if ($size === "small") {
$thumbfile = $file->smallthumb;
} else {
$thumbfile = $file->largethumb;
@@ -48,4 +50,4 @@
header("Content-type: image");
echo $contents;
exit;
-?> \ No newline at end of file
+?>