]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Notifications/Ping.php
Merge pull request #12143 from MrPetovan/bug/moderation
[friendica.git] / src / Module / Notifications / Ping.php
index 2d9110570036a373282ded30e4ae50118ca78867..2eaa2c4a5ca274faf6ce52e69a82ffe38f797396 100644 (file)
@@ -128,6 +128,11 @@ class Ping extends BaseModule
                                $this->session->getLocalUserId(), Verb::getID(Activity::FOLLOW)
                        ];
 
+                       // No point showing counts for non-top-level posts when the network page is ordered by received field
+                       if (Network::getTimelineOrderBySession($this->session, $this->pconfig) == 'received') {
+                               $condition = DBA::mergeConditions($condition, ["`parent` = `id`"]);
+                       }
+
                        $items_unseen = $this->database->toArray(Post::selectForUser(
                                $this->session->getLocalUserId(),
                                ['wall', 'uid', 'uri-id'],
@@ -236,7 +241,7 @@ class Ping extends BaseModule
                                                ],
                                                $this->l10n->t('{0} requested registration'),
                                                new \DateTime($reg['created'], new \DateTimeZone('UTC')),
-                                               new Uri($this->baseUrl->get(true) . '/admin/users/pending')
+                                               new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
                                        );
                                }
                        } elseif (count($registrations) > 1) {
@@ -247,7 +252,7 @@ class Ping extends BaseModule
                                        ],
                                        $this->l10n->t('{0} and %d others requested registration', count($registrations) - 1),
                                        new \DateTime($registrations[0]['created'], new \DateTimeZone('UTC')),
-                                       new Uri($this->baseUrl->get(true) . '/admin/users/pending')
+                                       new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
                                );
                        }