]> git.mxchange.org Git - friendica.git/blobdiff - mod/tagger.php
Docs: add a note on adding `use` on theme.php
[friendica.git] / mod / tagger.php
index 4da4ecafb7e885f564a49644c0ac62efaffa085b..16195cc339d2f02f4c04eb719f7e7b04484e1e98 100644 (file)
@@ -11,7 +11,6 @@ use Friendica\Database\DBM;
 use Friendica\Model\Item;
 
 require_once 'include/security.php';
-require_once 'include/bbcode.php';
 require_once 'include/items.php';
 
 function tagger_content(App $a) {
@@ -44,6 +43,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 +72,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('<link rel="alternate" type="text/html" href="'
-               . System::baseUrl() . '/display/' . $owner_nick . '/' . $item['id'] . '" />' . "\n") ;
+       if ($owner_nick) {
+               $href = System::baseUrl() . '/display/' . $owner_nick . '/' . $item['id'];
+       } else {
+               $href = System::baseUrl() . '/display/' . $item['guid'];
+       }
+
+       $link = xmlify('<link rel="alternate" type="text/html" href="'. $href . '" />' . "\n") ;
 
        $body = xmlify($item['body']);