From 4658cc505b285cd189497a3d53b6b01e17b71a68 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 1 Feb 2022 05:27:11 +0000 Subject: [PATCH] Issue 11156: Display "49+" notifications if there are 50 or more --- mod/ping.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod/ping.php b/mod/ping.php index 5399129d4..81aa9ec62 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -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,