aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-11-29 19:13:43 +0100
committerMax Kostikov <max@kostikov.co>2018-11-29 19:13:43 +0100
commit9de650e17521542d84d9d07e2c3fabfbf1519acc (patch)
tree0c986f37a18a5324836fe1b8f951524a8d5c40ce /include/text.php
parentd8b5f383f52274e30e02a8cf8ce77aac0a6bd910 (diff)
downloadvolse-hubzilla-9de650e17521542d84d9d07e2c3fabfbf1519acc.tar.gz
volse-hubzilla-9de650e17521542d84d9d07e2c3fabfbf1519acc.tar.bz2
volse-hubzilla-9de650e17521542d84d9d07e2c3fabfbf1519acc.zip
Cache for viewer channel
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 4 insertions, 5 deletions
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("/\<img(.*?)src=[\"|'](https?\:.*?)[\"|'](.*?)\>/",$s,$matches,PREG_SET_ORDER);
+ $cnt = preg_match_all("/\<img(.+?)src=[\"|'](https?\:.*?)[\"|'](.*?)\>/",$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,