aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Getfile.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-04-10 22:09:10 +0200
committerMax Kostikov <max@kostikov.co>2019-04-10 22:09:10 +0200
commit4b5922f65291f33657cb76b6689d3613d664cd5f (patch)
tree888c2c1661795c32ba230fa18e624730698245cd /Zotlabs/Module/Getfile.php
parent85be906b687873b436447f1acd2411528e3f4229 (diff)
downloadvolse-hubzilla-4b5922f65291f33657cb76b6689d3613d664cd5f.tar.gz
volse-hubzilla-4b5922f65291f33657cb76b6689d3613d664cd5f.tar.bz2
volse-hubzilla-4b5922f65291f33657cb76b6689d3613d664cd5f.zip
Fix wrong image resolution selection
Diffstat (limited to 'Zotlabs/Module/Getfile.php')
-rw-r--r--Zotlabs/Module/Getfile.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Getfile.php b/Zotlabs/Module/Getfile.php
index 5aa17b199..583cf38f0 100644
--- a/Zotlabs/Module/Getfile.php
+++ b/Zotlabs/Module/Getfile.php
@@ -110,9 +110,10 @@ class Getfile extends \Zotlabs\Web\Controller {
}
if($resolution > 0) {
- $r = q("select * from photo where resource_id = '%s' and uid = %d limit 1",
+ $r = q("SELECT * FROM photo WHERE resource_id = '%s' AND uid = %d AND imgscale = %d LIMIT 1",
dbesc($resource),
- intval($channel['channel_id'])
+ intval($channel['channel_id']),
+ $resolution
);
if($r) {
header('Content-type: ' . $r[0]['mimetype']);