]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Avoid link parsing problems in front of "share" elements
[friendica.git] / mod / display.php
index 41c4cc3b9a8a2683fa771c20f892342c3c6f5759..62e180874d1c60b6d61f19cd7516fda6688a719e 100644 (file)
@@ -122,9 +122,9 @@ function display_init(App $a)
 
 function display_fetchauthor($item)
 {
-       $shared = Item::getShareArray($item);
-       if (empty($shared['comment']) && !empty($shared['guid']) && !empty($shared['profile'])) {
-               $contact = Contact::getByURLForUser($shared['profile'], DI::userSession()->getLocalUserId());
+       $shared = DI::contentItem()->getSharedPost($item, ['author-link']);
+       if (!empty($shared) && empty($shared['comment'])) {
+               $contact = Contact::getByURLForUser($shared['post']['author-link'], DI::userSession()->getLocalUserId());
        }
 
        if (empty($contact)) {