aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-12-17 09:19:08 +0100
committerMax Kostikov <max@kostikov.co>2018-12-17 09:19:08 +0100
commitb0e5f5973af00cc8b228ec5054b3637c3455d5da (patch)
treed7d392c80d18d1eb68c5777b852baa47a17bf0fa
parent72dc6ea77c0c6aa439ea5f7a47130fbb354175ce (diff)
parent05cb4fd8971f9c196d21ab21f08e840e471ab804 (diff)
downloadvolse-hubzilla-b0e5f5973af00cc8b228ec5054b3637c3455d5da.tar.gz
volse-hubzilla-b0e5f5973af00cc8b228ec5054b3637c3455d5da.tar.bz2
volse-hubzilla-b0e5f5973af00cc8b228ec5054b3637c3455d5da.zip
Merge branch 'dev' into 'dev'
Move SSLify code from Photo cache addon See merge request hubzilla/core!1439
-rw-r--r--Zotlabs/Module/Photo.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 967a3b703..e236cc5f4 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -159,15 +159,14 @@ class Photo extends \Zotlabs\Web\Controller {
// Validate cache
$cache = array(
'resid' => $photo,
- 'uid' => $r[0]['uid'],
- 'status' => false
+ 'url' => htmlspecialchars_decode($r[0]['display_path'])
);
if($cache_mode['on'])
call_hooks('cache_url_hook', $cache);
- if(! $cache['status']) {
- $url = htmlspecialchars_decode($r[0]['display_path']);
- call_hooks('cache_sslify_hook', $url);
- header("Location: " . $url);
+ 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']);
killme();
}
}