Skip to content

Commit 2dc6bb5

Browse files
committed
Issues-604: Updated post count
1 parent 7f4467f commit 2dc6bb5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

config/vanilla/bootstrap.before.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,7 @@ function formatDateCustom($timestamp, $showDayOfWeek=true) {
999999
}
10001000
if (!function_exists('authorProfileStats')) {
10011001
function authorProfileStats($user) {
1002-
$countDiscussions = plural( $user->CountDiscussions, '%s Post', '%s Posts');
1003-
$countComments = plural( $user->CountComments, '%s Comment', '%s Comments');
1004-
return '<span class="MItem AuthorProfileStats AuthorProfileStats_'.$user->UserID.'">'.sprintf('%1s %2s', $countDiscussions,$countComments).'</span>';
1002+
$totalCount = ($user->CountDiscussions?$user->CountDiscussions : 0) + ($user->CountComments?$user->CountComments:0);
1003+
return '<span class="MItem AuthorProfileStats AuthorProfileStats_'.$user->UserID.'">'.sprintf('%1s posts', $totalCount).'</span>';
10051004
}
10061005
}

0 commit comments

Comments
 (0)