]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Some more "q" calls and deprecated logging replaced
[friendica.git] / mod / display.php
index d4651703219eac7af3ecb7c33cc4d19ee4c47fcb..a349a552c30c088a12074ce1f0bd0dc27764424e 100644 (file)
@@ -222,8 +222,8 @@ function display_content(App $a, $update = false, $update_uid = 0)
        }
 
        if (!DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) {
-               DBA::update('notification', ['seen' => true], ['parent-uri-id' => $item['parent-uri-id'], 'uid' => local_user()]);
-               DBA::update('notify', ['seen' => true], ['parent-uri-id' => $item['parent-uri-id'], 'uid' => local_user()]);
+               DI::notification()->setAllSeenForUser(local_user(), ['parent-uri-id' => $item['parent-uri-id']]);
+               DI::notify()->setAllSeenForUser(local_user(), ['parent-uri-id' => $item['parent-uri-id']]);
        }
 
        // We are displaying an "alternate" link if that post was public. See issue 2864
@@ -246,7 +246,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
        $page_uid = 0;
 
        $parent = null;
-       if (!empty($parent_uri_id)) {
+       if (!local_user() && !empty($parent_uri_id)) {
                $parent = Post::selectFirst(['uid'], ['uri-id' => $parent_uri_id, 'wall' => true]);
        }