Faster image processing with photo cache addon
This commit is contained in:
parent
cdb85f1309
commit
37d7d18bb7
@ -159,14 +159,15 @@ class Photo extends \Zotlabs\Web\Controller {
|
|||||||
// Validate cache
|
// Validate cache
|
||||||
$cache = array(
|
$cache = array(
|
||||||
'resid' => $photo,
|
'resid' => $photo,
|
||||||
'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['url'] != '') {
|
if(! $cache['status']) {
|
||||||
if(strpos(z_root(),'https:') !== false && strpos($cache['url'],'https:') === false)
|
$url = htmlspecialchars_decode($r[0]['display_path']);
|
||||||
$cache['url'] = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($cache['url']);
|
if(strpos(z_root(),'https:') !== false && strpos($url,'https:') === false)
|
||||||
header("Location: " . $cache['url']);
|
$url = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($url);
|
||||||
|
header("Location: " . $url);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user