Merge branch 'dev' into 'dev'

fix urls on imported item taxonomy

See merge request hubzilla/core!1695
This commit is contained in:
Mario 2019-07-30 23:07:33 +02:00
commit 32874b89ca
2 changed files with 10 additions and 1 deletions

View File

@ -177,7 +177,7 @@ class Group extends Controller {
if($r) if($r)
$result = group_rmv(local_channel(),$r[0]['gname']); $result = group_rmv(local_channel(),$r[0]['gname']);
if($result) { if($result) {
$hookinfo = [ 'pgrp_extras' => '', 'group'=>$argv(2) ]; $hookinfo = [ 'pgrp_extras' => '', 'group' => argv(2) ];
call_hooks ('privacygroup_extras_drop',$hookinfo); call_hooks ('privacygroup_extras_drop',$hookinfo);
info( t('Privacy group removed.') . EOL); info( t('Privacy group removed.') . EOL);
} }

View File

@ -3107,6 +3107,15 @@ function item_url_replace($channel,&$item,$old,$new,$oldnick = '') {
if($oldnick) if($oldnick)
$item['llink'] = str_replace('/' . $oldnick . '/' ,'/' . $channel['channel_address'] . '/' ,$item['llink']); $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']);
}
}
}
} }