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
|
// Validate cache
|
||||||
$cache = array(
|
$cache = array(
|
||||||
'resid' => $photo,
|
'resid' => $photo,
|
||||||
'uid' => $r[0]['uid'],
|
'url' => htmlspecialchars_decode($r[0]['display_path'])
|
||||||
'status' => false
|
|
||||||
);
|
);
|
||||||
if($cache_mode['on'])
|
if($cache_mode['on'])
|
||||||
call_hooks('cache_url_hook', $cache);
|
call_hooks('cache_url_hook', $cache);
|
||||||
if(! $cache['status']) {
|
if($cache['url'] != '') {
|
||||||
$url = htmlspecialchars_decode($r[0]['display_path']);
|
if(strpos(z_root(),'https:') !== false && strpos($cache['url'],'https:') === false)
|
||||||
call_hooks('cache_sslify_hook', $url);
|
$cache['url'] = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($cache['url']);
|
||||||
header("Location: " . $url);
|
header("Location: " . $cache['url']);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user