aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-05-30 13:41:32 +0200
committerMax Kostikov <max@kostikov.co>2019-05-30 13:41:32 +0200
commita8e25ccfe6a00c2b25eb75f0b20a1d854adcecb9 (patch)
treeadf4ccecfa0beb457d649ca1da8528c9909443b3
parentd0322f5fbdf7a1ec3ac3ee894a8eabc4b252cf57 (diff)
downloadvolse-hubzilla-a8e25ccfe6a00c2b25eb75f0b20a1d854adcecb9.tar.gz
volse-hubzilla-a8e25ccfe6a00c2b25eb75f0b20a1d854adcecb9.tar.bz2
volse-hubzilla-a8e25ccfe6a00c2b25eb75f0b20a1d854adcecb9.zip
Add single photo URL rewrite for clonned channel
-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']));