From 1a87fcb5b3bc28dc7b245218d6ea6e87b05eaf25 Mon Sep 17 00:00:00 2001 From: rabuzarus Date: Mon, 12 Feb 2018 19:28:14 +0100 Subject: [PATCH] tagger_content(): handle case where $owner_nick is empty --- mod/tagger.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mod/tagger.php b/mod/tagger.php index 4da4ecafb7..c602613f1f 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -44,6 +44,8 @@ function tagger_content(App $a) { $item = $r[0]; $owner_uid = $item['uid']; + $owner_nick = ''; + $blocktags = 0; $r = q("select `nickname`,`blocktags` from user where uid = %d limit 1", intval($owner_uid) @@ -71,8 +73,13 @@ function tagger_content(App $a) { $post_type = (($item['resource-id']) ? L10n::t('photo') : L10n::t('status')); $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE ); - $link = xmlify('' . "\n") ; + if ($owner_nick) { + $href = System::baseUrl() . '/display/' . $owner_nick . '/' . $item['id']; + } else { + $href = System::baseUrl() . '/display/' . $item['guid']; + } + + $link = xmlify('' . "\n") ; $body = xmlify($item['body']); -- 2.39.5