Commit 37d7d18b authored by Max Kostikov's avatar Max Kostikov

Faster image processing with photo cache addon

parent cdb85f13
Pipeline #99250 passed with stage
in 4 minutes and 43 seconds
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment