aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2018-11-30 19:56:49 +0100
committerMax Kostikov <max@kostikov.co>2018-11-30 19:56:49 +0100
commitc857ecab468d50997e3b0280178f387480ecd5a3 (patch)
tree2d01814e2bd29e8d9d1d2ab48daf8178663eaa34 /include/items.php
parentcded6b11366e15d6d4ac3eb6d9f86f4d0a60fa7c (diff)
downloadvolse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.tar.gz
volse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.tar.bz2
volse-hubzilla-c857ecab468d50997e3b0280178f387480ecd5a3.zip
Create plink depending on message id format
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php2
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);
}