aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}
}