X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fping.php;h=196758b0dfbc007ba6d14057629a0d534a445572;hb=4d5b79a9d46ad07716febaac02e59dafe3baad90;hp=0256500dfe12fd0b92eb683a29c20741bedfc869;hpb=133cd342d462b37bf4ea2d902e96733bba04190f;p=friendica.git diff --git a/mod/ping.php b/mod/ping.php index 0256500dfe..196758b0df 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -130,12 +130,12 @@ function ping_init(App $a) $condition = ["`unseen` AND `uid` = ? AND `contact-id` != ?", local_user(), local_user()]; $fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar', - 'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid']; + 'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid', 'wall']; $params = ['order' => ['created' => true]]; - $items = Item::select(local_user(), $fields, $condition, $params); + $items = Item::selectForUser(local_user(), $fields, $condition, $params); if (DBM::is_result($items)) { - $items_unseen = dba::inArray($items); + $items_unseen = Item::inArray($items); $arr = ['items' => $items_unseen]; Addon::callHooks('network_ping', $arr); @@ -278,6 +278,7 @@ function ping_init(App $a) if (DBM::is_result($intros)) { foreach ($intros as $intro) { $notif = [ + 'id' => 0, 'href' => System::baseUrl() . '/notifications/intros/' . $intro['id'], 'name' => $intro['name'], 'url' => $intro['url'], @@ -293,6 +294,7 @@ function ping_init(App $a) if (DBM::is_result($mails)) { foreach ($mails as $mail) { $notif = [ + 'id' => 0, 'href' => System::baseUrl() . '/message/' . $mail['id'], 'name' => $mail['from-name'], 'url' => $mail['from-url'], @@ -308,6 +310,7 @@ function ping_init(App $a) if (DBM::is_result($regs)) { foreach ($regs as $reg) { $notif = [ + 'id' => 0, 'href' => System::baseUrl() . '/admin/users/', 'name' => $reg['name'], 'url' => $reg['url'], @@ -487,7 +490,7 @@ function ping_get_notifications($uid) if ($notification["visible"] && !$notification["deleted"] - && !(x($result, $notification["parent"]) && is_array($result[$notification["parent"]])) + && !(x($result, $notification["parent"]) && !empty($result[$notification["parent"]])) ) { // Should we condense the notifications or show them all? if (PConfig::get(local_user(), 'system', 'detailed_notif')) {