Repository navigation
[3.0] Lists ten topic starters in the statistics centre - #9725
Merged
jdarwood007 merged 1 commit intoOct 4, 2026
Merged
jdarwood007 merged 1 commit into
jdarwood007 merged 1 commit into
Conversation
The top topic starters are counted from the topics table, twenty of them, and their names looked up afterwards. Each was placed by its rank and those ranked after index 10 were skipped, which kept eleven. A starter with no member to name, such as topics credited to a guest or to a deleted member, kept its place empty, so the two faults could hide each other. Now the members found are taken in rank order and the first ten kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This was referenced Oct 4, 2026
jdarwood007
pushed a commit
that referenced
this pull request
Oct 17, 2026
$i > 10 kept ranks 0 to 10, which is eleven, and a starter with no member to name (a guest or a deleted member) left its rank empty. The list now takes the members found, in rank order, and keeps the first ten. Backport of #9725. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The statistics centre's topic starters list counts the twenty members with the most topics, looks their names up, and places each by rank:
Two things go wrong with that:
$i > 10keeps ranks 0 to 10, which is eleven. Every other list on the page has ten.The two faults can cancel out: on a forum where one of the top eleven is a guest, the list shows ten. That also means fixing only the
>would leave a gap.It now takes the members that were found, in rank order, and keeps the first ten.
Tests
tests/Integration/Http/StatsStartersTest.php, with members and topics made for the test and removed afterwards:>changed to>=, this one gets nine.Both pass on MySQL and PostgreSQL.
tests/Integration/Httpis not part of the CI run yet.2.1.7 has the same code. #9722 changes the query that feeds this list, but not these lines.
Issues References (Fixes|Related|Closes)
Related: #9722
🤖 Generated with Claude Code