aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-11-29 11:56:56 +0100
committerMax Kostikov <max@kostikov.co>2018-11-29 11:56:56 +0100
commit6aa99a903fd221d306c62a807cf3c1a4564f0b4d (patch)
tree9cef83a41ceca0875ae7e91e6b1202423ebdfbce
parentd9faf6c4bb5d26d6eff5e3176b46761ea26dcf63 (diff)
downloadvolse-hubzilla-6aa99a903fd221d306c62a807cf3c1a4564f0b4d.tar.gz
volse-hubzilla-6aa99a903fd221d306c62a807cf3c1a4564f0b4d.tar.bz2
volse-hubzilla-6aa99a903fd221d306c62a807cf3c1a4564f0b4d.zip
Code cleanup
-rw-r--r--Zotlabs/Module/Photo.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 55e92ca04..b8d1c36f2 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -5,6 +5,7 @@ namespace Zotlabs\Module;
require_once('include/security.php');
require_once('include/attach.php');
+require_once('include/photo/photo_driver.php');
class Photo extends \Zotlabs\Web\Controller {
@@ -155,16 +156,15 @@ class Photo extends \Zotlabs\Web\Controller {
if(! in_array($resolution,[4,5,6]))
$allowed = (-1);
if($u === PHOTO_CACHE) {
- $origurl = $r[0]['display_path'];
// Cached image leak protection
if(! (local_channel() || $cache_mode['leak'])) {
- header("Location: " . $origurl);
+ header("Location: " . $r[0]['display_path']);
killme();
}
// Revalidate cache
if($cache_mode['on'] && strtotime($r[0]['expires']) - 60 < time()) {
$cache = array(
- 'url' => $origurl,
+ 'url' => $r[0]['display_path'],
'uid' => $r[0]['uid']
);
call_hooks('cache_url_hook', $cache);