aboutsummaryrefslogtreecommitdiff
path: root/classes/File.php
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2015-02-25 01:34:00 +0100
committerMikael Nordfeldth <mmn@hethane.se>2015-02-25 01:34:00 +0100
commit9a843548c0c95cac3c9d6e8674c26d11fca027ed (patch)
tree25e80941f9d3e0f3a673b87377e291830dd597d5 /classes/File.php
parent220a13b87f061ffc7771dd80c9d442b528cbc5ec (diff)
downloadgnu-social-9a843548c0c95cac3c9d6e8674c26d11fca027ed.tar
gnu-social-9a843548c0c95cac3c9d6e8674c26d11fca027ed.zip
Save thumbnails with proper extension
This might cause double extensions, but that's ok since the filename is stored in the database. We might want to look at it later though.
Diffstat (limited to 'classes/File.php')
-rw-r--r--classes/File.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php
index 8fd040b7e9..242d109804 100644
--- a/classes/File.php
+++ b/classes/File.php
@@ -442,7 +442,7 @@ class File extends Managed_DataObject
}
// throws exception on failure to generate thumbnail
- $outname = "thumb-{$width}x{$height}-" . $image->filename;
+ $outname = "thumb-{$width}x{$height}-{$image->filename}." . File::guessMimeExtension($image->mimetype);
$outpath = self::path($outname);
// The boundary box for our resizing