aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Photo.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-01-16 16:52:21 -0800
committerzotlabs <mike@macgirvin.com>2019-01-16 16:52:21 -0800
commit7e29bd10b6a59bc9c1700cfb84dbefb6a8930153 (patch)
treeac49731f7ed9a5071bd4fcf76faaa2003204064c /Zotlabs/Module/Photo.php
parent20eea2184bc1336efb811c29e3fb49262ae02262 (diff)
parentde8582ec07d125bf1c7f08cc3d695c33aaaf9d85 (diff)
downloadvolse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.gz
volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.bz2
volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Photo.php')
-rw-r--r--Zotlabs/Module/Photo.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index e236cc5f4..96a4e1f40 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -159,14 +159,15 @@ class Photo extends \Zotlabs\Web\Controller {
// Validate cache
$cache = array(
'resid' => $photo,
- 'url' => htmlspecialchars_decode($r[0]['display_path'])
+ 'status' => false
);
if($cache_mode['on'])
call_hooks('cache_url_hook', $cache);
- if($cache['url'] != '') {
- if(strpos(z_root(),'https:') !== false && strpos($cache['url'],'https:') === false)
- $cache['url'] = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($cache['url']);
- header("Location: " . $cache['url']);
+ if(! $cache['status']) {
+ $url = htmlspecialchars_decode($r[0]['display_path']);
+ if(strpos(z_root(),'https:') !== false && strpos($url,'https:') === false)
+ $url = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($url);
+ header("Location: " . $url);
killme();
}
}