aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-07-28 19:57:17 -0700
committerzotlabs <mike@macgirvin.com>2019-07-28 19:57:17 -0700
commit696359daba11c51d8f733dfa173e48b5e1de69ef (patch)
tree6fd18e159bd16dc5f06e42b1c9f642fb82da1f9b /include/text.php
parent39c0a7525b27fa2f8fff8a6d67104ed98acbf046 (diff)
downloadvolse-hubzilla-696359daba11c51d8f733dfa173e48b5e1de69ef.tar.gz
volse-hubzilla-696359daba11c51d8f733dfa173e48b5e1de69ef.tar.bz2
volse-hubzilla-696359daba11c51d8f733dfa173e48b5e1de69ef.zip
fix urls on imported item taxonomy
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index a2dfda952..a49ff5a29 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3105,6 +3105,15 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
if($oldnick)
$item['llink'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['llink']);
+ if($item['term']) {
+ for($x = 0; $x < count($item['term']); $x ++) {
+ $item['term'][$x]['url'] = str_replace($old,$new,$item['term'][$x]['url']);
+ if ($oldnick) {
+ $item['term'][$x]['url'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['term'][$x]['url']);
+ }
+ }
+ }
+
}