aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-05-30 13:45:20 +0200
committerMax Kostikov <max@kostikov.co>2019-05-30 13:45:20 +0200
commit7e26ee5a733936f7fb694e71b2f875ef27ff4209 (patch)
tree27bd2ccee03a44fcceda983d9798e2786cc9f191 /include
parent767a235611012200c6767ca602d736e7ab3b8b40 (diff)
parenta8e25ccfe6a00c2b25eb75f0b20a1d854adcecb9 (diff)
downloadvolse-hubzilla-7e26ee5a733936f7fb694e71b2f875ef27ff4209.tar.gz
volse-hubzilla-7e26ee5a733936f7fb694e71b2f875ef27ff4209.tar.bz2
volse-hubzilla-7e26ee5a733936f7fb694e71b2f875ef27ff4209.zip
Merge branch 'dev' into 'dev'
Add single photo URL rewrite for clonned channel See merge request hubzilla/core!1663
Diffstat (limited to 'include')
-rw-r--r--include/text.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index 6a2a9e427..a2dfda952 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3091,7 +3091,7 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
json_url_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['target']);
}
- $item['body'] = preg_replace("/(\[zrl=".preg_quote($old,'/')."\/(photos|gallery)\/".$channel['channel_address'].".+\]\[zmg=\d+x\d+\])".preg_quote($old,'/')."\/(.+\[\/zmg\])/", '${1}'.$new.'/${3}', $item['body']);
+ $item['body'] = preg_replace("/(\[zrl=".preg_quote($old,'/')."\/(photo|photos|gallery)\/".$channel['channel_address'].".+\]\[zmg=\d+x\d+\])".preg_quote($old,'/')."\/(.+\[\/zmg\])/", '${1}'.$new.'/${3}', $item['body']);
$item['body'] = preg_replace("/".preg_quote($old,'/')."\/(search|\w+\/".$channel['channel_address'].")/", $new.'/${1}', $item['body']);
$item['sig'] = base64url_encode(rsa_sign($item['body'],$channel['channel_prvkey']));