diff options
author | Max Kostikov <max@kostikov.co> | 2018-11-30 19:56:49 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-11-30 19:56:49 +0100 |
commit | c857ecab468d50997e3b0280178f387480ecd5a3 (patch) | |
tree | 2d01814e2bd29e8d9d1d2ab48daf8178663eaa34 /include | |
parent | cded6b11366e15d6d4ac3eb6d9f86f4d0a60fa7c (diff) | |
download | volse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.tar.gz volse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.tar.bz2 volse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.zip |
Create plink depending on message id format
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php index 2cee376d0..33ef6edad 100755 --- a/include/items.php +++ b/include/items.php @@ -420,7 +420,7 @@ function post_activity_item($arr, $allow_code = false, $deliver = true) { $arr['comment_policy'] = map_scope(PermissionLimits::Get($channel['channel_id'],'post_comments')); if ((! $arr['plink']) && (intval($arr['item_thread_top']))) { - $arr['plink'] = substr(z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . urlencode($arr['mid']),0,190); + $arr['plink'] = substr(z_root() . '/channel/' . $channel['channel_address'] . '/' . (filter_var($arr['mid'], FILTER_VALIDATE_URL) === false ? '?f=&mid=' : '') . urlencode($arr['mid']),0,190); } |