]> git.mxchange.org Git - friendica.git/blobdiff - mod/ping.php
Fix for displaying public items
[friendica.git] / mod / ping.php
index 8028d69ed268be7bcda84be3a3aa1299472675b5..196758b0dfbc007ba6d14057629a0d534a445572 100644 (file)
@@ -130,7 +130,7 @@ 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::selectForUser(local_user(), $fields, $condition, $params);
 
@@ -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')) {