]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11156: Display "49+" notifications if there are 50 or more
authorMichael <heluecht@pirati.ca>
Tue, 1 Feb 2022 05:27:11 +0000 (05:27 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 1 Feb 2022 05:27:11 +0000 (05:27 +0000)
mod/ping.php

index 5399129d43e8cc2b2a8bc76f276ffa78ddcd31eb..81aa9ec6202615c617d9ae6972291e6e0abba7bd 100644 (file)
@@ -350,9 +350,11 @@ function ping_init(App $a)
        }
 
        if ($format == 'json') {
+               $notification_count = $sysnotify_count + $intro_count + $register_count;
+               
                $data['groups'] = $groups_unseen;
                $data['forums'] = $forums_unseen;
-               $data['notification'] = $sysnotify_count + $intro_count + $register_count;
+               $data['notification'] = ($notification_count < 50) ? $notification_count : '49+';
                $data['notifications'] = $notifications;
                $data['sysmsgs'] = [
                        'notice' => $sysmsgs,