]> git.mxchange.org Git - friendica.git/blobdiff - mod/ping.php
Merge pull request #10228 from MrPetovan/bug/warnings
[friendica.git] / mod / ping.php
index c7ac8d8059dcd06d1e2c6d3e2a080eac954c937f..64c947e2c63aa760108e3a1ccfc0a25a8cea1887 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -139,7 +139,7 @@ function ping_init(App $a)
                        local_user(), Verb::getID(Activity::FOLLOW)];
                $items = Post::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
                if (DBA::isResult($items)) {
-                       $items_unseen = Post::toArray($items);
+                       $items_unseen = Post::toArray($items, false);
                        $arr = ['items' => $items_unseen];
                        Hook::callAll('network_ping', $arr);
 
@@ -412,8 +412,8 @@ function ping_get_notifications($uid)
 
        do {
                $r = q(
-                       "SELECT `notify`.*, `post-view`.`visible`, `post-view`.`deleted`
-                       FROM `notify` LEFT JOIN `post-view` ON `post-view`.`id` = `notify`.`iid`
+                       "SELECT `notify`.*, `post`.`visible`, `post`.`deleted`
+                       FROM `notify` LEFT JOIN `post` ON `post`.`uri-id` = `notify`.`uri-id`
                        WHERE `notify`.`uid` = %d AND `notify`.`msg` != ''
                        AND NOT (`notify`.`type` IN (%d, %d))
                        AND $seensql `notify`.`seen` ORDER BY `notify`.`date` $order LIMIT %d, 50",