Move SSLify code from Photo cache addon
This commit is contained in:
parent
72dc6ea77c
commit
05cb4fd897
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user