From 9de650e17521542d84d9d07e2c3fabfbf1519acc Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 29 Nov 2018 19:13:43 +0100 Subject: Cache for viewer channel --- include/text.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index 00e12dc06..a20d9564b 100644 --- a/include/text.php +++ b/include/text.php @@ -1108,18 +1108,17 @@ function linkify($s, $me = false) { * @param int $uid * @returns string */ -function sslify($s, $uid) { +function sslify($s) { // Local photo cache if(get_config('system','photo_cache_enable', 0) && local_channel()) { $matches = null; - $cnt = preg_match_all("/\/",$s,$matches,PREG_SET_ORDER); + $cnt = preg_match_all("/\/",$s,$matches,PREG_SET_ORDER); if ($cnt) { foreach ($matches as $match) { logger('uid: ' . $uid . '; url: ' . $match[2], LOGGER_DEBUG); $cache = array( - 'url' => $match[2], - 'uid' => $uid + 'url' => $match[2] ); call_hooks('cache_url_hook', $cache); logger('cache status: ' . intval($cache['status']) .'; cached as: ' . ($cache['cached'] ? $cache['hash'] : '-'), LOGGER_DEBUG); @@ -1702,7 +1701,7 @@ function prepare_body(&$item,$attach = false,$opts = false) { if(local_channel() == $item['uid']) $filer = format_filer($item); - $s = sslify($s, $item['uid']); + $s = sslify($s); $prep_arr = array( 'item' => $item, -- cgit v1.2.3