]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Merge pull request #8632 from annando/fix-fatal
[friendica.git] / mod / display.php
index fd0079f9f6992ba5009059144024c5e72b5f7225..a06d8a72394fa3cd588e7f9f6346688faffc98ae 100644 (file)
@@ -42,7 +42,7 @@ use Friendica\Util\Strings;
 function display_init(App $a)
 {
        if (ActivityPub::isRequest()) {
-               Objects::rawContent();
+               Objects::rawContent(['guid' => $a->argv[1] ?? null]);
        }
 
        if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
@@ -116,11 +116,7 @@ function display_init(App $a)
                $nickname = str_replace(Strings::normaliseLink(DI::baseUrl()) . '/profile/', '', Strings::normaliseLink($profiledata['url']));
 
                if (!empty($a->user['nickname']) && $nickname != $a->user['nickname']) {
-                       $profile = DBA::fetchFirst("SELECT `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile`
-                               INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
-                               WHERE `user`.`nickname` = ? AND `contact`.`self` LIMIT 1",
-                               $nickname
-                       );
+                       $profile = DBA::selectFirst('owner-view', [], ['nickname' => $nickname]);
                        if (DBA::isResult($profile)) {
                                $profiledata = $profile;
                        }