aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-02-10 04:40:54 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-02-10 04:40:54 +0100
commit733debd9b37e0d9ba508ddf5d63c8d7411e24d98 (patch)
tree7eaba95821cbeb5cd7496a1afcae3ff3037ce892 /classes
parent8806cce7354a0b79a1f80848e43c7479eed5f26f (diff)
downloadgnu-social-733debd9b37e0d9ba508ddf5d63c8d7411e24d98.tar
gnu-social-733debd9b37e0d9ba508ddf5d63c8d7411e24d98.zip
Use thumbnail upscaling config value
Diffstat (limited to 'classes')
-rw-r--r--classes/File.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/File.php b/classes/File.php
index 145a01356c..6ba80eb5f6 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -416,7 +416,7 @@ class File extends Managed_DataObject
* @throws UnsupportedMediaException if, despite trying, we can't understand how to make a thumbnail for this format
* @throws ServerException on various other errors
*/
- public function getThumbnail($width=null, $height=null, $crop=false, $force_still=true)
+ public function getThumbnail($width=null, $height=null, $crop=false, $force_still=true, $upscale=null)
{
// Get some more information about this file through our ImageFile class
$image = ImageFile::fromFileObject($this);
@@ -428,7 +428,8 @@ class File extends Managed_DataObject
}
}
- return $image->getFileThumbnail($width, $height, $crop);
+ return $image->getFileThumbnail($width, $height, $crop,
+ !is_null($upscale) ? $upscale : common_config('thumbnail', 'upscale'));
}
public function getPath()