save channel/<channel>/?mid=... plinks with the items

This commit is contained in:
zottel 2014-01-09 16:02:40 +01:00
parent cd65d172ba
commit c0f6d73195

View File

@ -1602,8 +1602,15 @@ function item_store($arr,$allow_exec = false) {
$arr['llink'] = z_root() . '/display/' . $arr['mid'];
if(! $arr['plink'])
$arr['plink'] = $arr['llink'];
if(! $arr['plink']) {
if (local_user()){
$channel = get_app()->get_channel();
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?mid=' . $arr['mid'];
} else {
// can this ever happen?
$arr['plink'] = $arr['llink'];
}
}
if($arr['parent_mid'] === $arr['mid']) {
$parent_id = 0;