aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-11-29 23:28:45 +0100
committerMax Kostikov <max@kostikov.co>2018-11-29 23:28:45 +0100
commit6f2d09eb205f09cdc83225b6fadff316b934e1eb (patch)
tree2f3c0446db12d5e835e0e4da978cb3b01f09be8c /include/text.php
parentd6442ec99160c1f556d9e5b7bc3b2fec76200aa1 (diff)
downloadvolse-hubzilla-6f2d09eb205f09cdc83225b6fadff316b934e1eb.tar.gz
volse-hubzilla-6f2d09eb205f09cdc83225b6fadff316b934e1eb.tar.bz2
volse-hubzilla-6f2d09eb205f09cdc83225b6fadff316b934e1eb.zip
Fix wrong parameter
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index 234747342..7c0610ed9 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1111,10 +1111,9 @@ function linkify($s, $me = false) {
function sslify($s) {
// Local photo cache
- $cacheon = get_config('system','photo_cache_enable', 0);
- if($cache && local_channel()) {
+ 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);
@@ -1142,7 +1141,7 @@ function sslify($s) {
$pattern = (($allow) ? "/\<(.*?)src=[\"|'](http\:.*?)[\"|'](.*?)\>/" : "/\<img(.*?)src=[\"|'](http\:.*?)[\"|'](.*?)\>/" );
$matches = null;
- $cnt = preg_match_all($pattern,$s,$matches,PREG_SET_ORDER);
+ $cnt = preg_match_all($pattern, $s, $matches, PREG_SET_ORDER);
if ($cnt) {
foreach ($matches as $match) {
$filename = basename( parse_url($match[2], PHP_URL_PATH) );