Repository navigation
fix(lists): make the server and time filters actually filter - #85
Merged
Merged
Conversation
Ban list: the filter form always submits `searchText=`, so Apply always hits the search branch, whose WHERE was `A OR B OR C OR D AND <filters>` with no parentheses. The server / time / state / hide-inactive predicates only bound the reason arm and the empty search matched every row through the others. Wrap the OR group in both the list and count queries. Comm blocks: `?server=` / `?time=` were only used to pre-select the dropdowns. Build them into the same predicate block as the type chip (mirroring the banlist's $publicFilter* shape), apply it in the search, no-search and advSearch branches, and keep it in $searchlink so pagination and the hide-inactive toggle preserve it. Also fixes a SQL 1064 in the commslist advSearch branch when $where resolves empty and hide-inactive is on (bare ` AND (...)` with no WHERE). Fixes #84
Rushaway
added a commit
that referenced
this pull request
Oct 29, 2026
Keep both CHANGELOG sections: 2.2.8-srcdslab (#85) above this PR's 2.2.7-srcdslab.
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.
Fixes #84.
What was wrong
Ban list. The filter form always submits
searchText=, so every Apply goes through the search branch. Its WHERE wasA OR B OR C OR D AND <filters>with no parentheses, so the server, time, status-chip and Hide-inactive predicates only bound thereasonarm. The empty search ('%%') matched every row through the other arms, so all of them were no-ops. The commslist got this parentheses fix in sbpp#1274; the banlist never did.Comm blocks.
?server=/?time=only pre-selected the dropdowns. No query read them.Changes
page.banlist.php: wrap the searchORgroup in parentheses in both the list and count queries.page.commslist.php: buildserver/timeinto the same predicate block as the?type=chip, using the banlist's$publicFilterAnd/$publicFilterWheren/$publicFilterArgs/$publicFilterLinkshape. Apply it in all three branches (search, no search, advSearch). Carry it in$searchlinkso pagination and the Hide-inactive toggle keep it. The no-search count query now aliases the table asCO, so one suffix serves both queries.page.commslist.phpadvSearch: when$whereis empty and Hide inactive is on, the query used to end in a bareAND (…)with noWHERE(SQL 1064). That can happen with an unknownadvType, or withadvType=adminfor a visitor when admin names are hidden. Hide inactive now becomes theWHERE.$filterson the commslist reports the sanitised server/time values, like the banlist.web/tests/integration/PublicListFilterBarTest.php(9 tests). It reads the View'sban_list,total_bansandsearchlinkthrough a capturing stub Smarty, so it checks the list query, the count query and link preservation.2.2.8-srcdslab(2.2.6 / 2.2.7 are taken by perf: set the database charset once per connection in sbpp_main #82 / fix(sql): async-safe comms queue, keep DB across maps, index-friendly SteamID lookups #83). No template change, so notheme_versionbump.Verification
origin/main's handlers it fails 9/9: 8 wrong row sets plus the SQL 1064.includes/Auth/Auth.php(untouched) and come from the local dev DB missingsb_login_tokens.aid.Upstream
sbpp/sourcebans-ppmainhas the same bug.