]> git.mxchange.org Git - friendica.git/blobdiff - mod/ping.php
Merge pull request #9843 from annando/no-filetag
[friendica.git] / mod / ping.php
index 762d0a0f8187f0d6a1b4eda6cbc8924df5360633..810598a0b3e5addda5d340df66fed33a86529a41 100644 (file)
@@ -28,8 +28,8 @@ use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\Group;
-use Friendica\Model\Item;
 use Friendica\Model\Notify\Type;
+use Friendica\Model\Post;
 use Friendica\Model\Verb;
 use Friendica\Protocol\Activity;
 use Friendica\Util\DateTimeFormat;
@@ -137,9 +137,9 @@ function ping_init(App $a)
 
                $condition = ["`unseen` AND `uid` = ? AND NOT `origin` AND (`vid` != ? OR `vid` IS NULL)",
                        local_user(), Verb::getID(Activity::FOLLOW)];
-               $items = Item::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
+               $items = Post::selectForUser(local_user(), ['wall', 'uid', 'uri-id'], $condition);
                if (DBA::isResult($items)) {
-                       $items_unseen = Item::inArray($items);
+                       $items_unseen = Post::toArray($items);
                        $arr = ['items' => $items_unseen];
                        Hook::callAll('network_ping', $arr);
 
@@ -412,8 +412,8 @@ function ping_get_notifications($uid)
 
        do {
                $r = q(
-                       "SELECT `notify`.*, `item`.`visible`, `item`.`deleted`
-                       FROM `notify` LEFT JOIN `item` ON `item`.`id` = `notify`.`iid`
+                       "SELECT `notify`.*, `post-view`.`visible`, `post-view`.`deleted`
+                       FROM `notify` LEFT JOIN `post-view` ON `post-view`.`id` = `notify`.`iid`
                        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",