Neither SpecialWatchlistFilters nor SpecialRecentChangesFilters are used in any
code known to Wikimedia code search. The related code to use these hooks was
only ever used within the MediaWiki repo.
Change-Id: Ib631d49d7b5835c665171dbad3e8a646b80827ef
Unpatrolled, manual and auto.
This moves the old hidepatrolled/hideunpatrolled filters to a legacy
group, and adds a new string options group with three options.
Also adds code mapping the old parameters to the new ones, and handling
for the hidepatrolled preference.
Bug: T190408
Change-Id: Ic1f181d3704c1d998696617a0d10270a87f22a62
Otherwise these tests break completely when you add conditions like
$conds['rc_patrolled'] = [ 1, 2 ];
That maps to 'rc_patrolled IN (1,2)', but the DIY code in
normalizeCondition() was too simplistic to generate that.
Change-Id: I449317185f98e20b3e17f1b13610d872ae828171
Storing the user name or IP in every row in large tables like revision
and logging takes up space and makes operations on these tables slower.
This patch begins the process of moving those into one "actor" table
which other tables can reference with a single integer field.
A subsequent patch will remove the old columns.
Bug: T167246
Depends-On: I9293fd6e0f958d87e52965de925046f1bb8f8a50
Change-Id: I8d825eb02c69cc66d90bd41325133fd3f99f0226
- Replace old options 'hideanons' or 'hideliu' with structured UI equivalent.
- Update tests to take this new behavior into account.
Bug: T176172
Change-Id: I6ad050f7864bf51db05c3db957ac3533358cd3ac
Add 'registered' and 'unregistered' filters to
user experience group.
Keep minimal definitions of user registration to
support hideanons and hideliu for no-js and
users who are not using ERI filters.
Reword all user experience levels description according
to the phab task.
Bug: T165160
Change-Id: Ie6b1795d7cbdb1692f8eeb13db7afb89ea4e5bbc
It's ; for namespaces (since that is generally what we're using,
e.g. for STRING_OPTIONS), and | for tags. I would have
preferred them to all be consistent, but there is one revision
that has a ;, and this seems better than modifying the DB.
Comma is already used as a delimiter between separate parameters
(e.g. hideanons and namepsace).
Also, fix multiple namespaces for parseParameters and add test
cases.
Bug: T164132
Bug: T164133
Change-Id: Iad061e0bc17e3522a3f5d330ac2c8bf9cf0e614f
Some combinations of RC filters should never appear
together because they guarantee to return no data
and cannot be visually represented in the new RC
filters UI (ERI project).
Examples include:
* 'hidemyself' and 'hidebyothers'
* 'hideminor' and 'hidemajor'
* All of the filters in the changeType group (which
is extended by extensions)
This also handles an old special case, but it now redirects
instead of doing it silently:
hideanons=1 & hideliu=1 & hidebots=1 -> hideliu=1 & hidebots=1
hideanons=1 & hideliu=1 & hidebots=0 -> hidehumans=1
Bug: T151873
Change-Id: Id08dccd07b262ce61c9d38563f19a0ab181e2341
Capture `$now = time()` only once and propagate
the value in the test and production code.
Bug: T161041
Change-Id: Ib2887a81a4e8015e3c80ef89d48181c7e5e1d406
This is to make sure that the function under tests
correctly adds 'user' to the $tables variable
where it adds conditions against this table.
Bug: T161041
Change-Id: I0e9e97e4a24bdf6f488bc1b1e758904496c7efe8
Replaces \TestingAccessWrapper (defined in core) with
\Wikimedia\TestingAccessWrapper (defined in the composer package
wikimedia/testing-access-wrapper).
See https://gerrit.wikimedia.org/r/#/q/topic:librarize-testing-access-wrapper
for downstream patches.
The core version of the class is kept around for a while to avoid
circular dependency problems.
Bug: T163434
Change-Id: I52cc257e593da3d6c3b01a909e554a950225aec8
Filters are in conflict when their combination is guaranteed
to return no results. For instance: minor and log entries
is a conflict because major/minor does not apply to
log entries and the field is set to major by default.
Letting conflicts go through result in some very slow
database queries.
Bug: T160220
Change-Id: Ia6b0125c675c4a3cc4e4be4f83d1bd10d23059ba
hidebyothers was extremely slow (on large data sets) due to the
lack of an index on rc_user. To fix this, changed to use rc_user_text.
hidemyself seems to be fine (assuming normal usage patterns), but
to avoid edge cases and ensure full coverage, it's been changed as
well.
I'll inquire about adding an index for this.
Bug: T161557
Change-Id: I61efe11de12e8ab6c01e8d913cdeda471132a6ee
Generate old RC, Related changes (it was already displayed and working
on 'Related changes' before this change), and Watchlist/etc. and data
for new UI from back-end.
This moves everything used for defining the old (unstructured) and new
(structured) filters into unified objects, ChangesListFilter and
ChangesListFilterGroup (and sub-classes).
This includes the query logic (see below) and logic for adding
CSS attribution classes.
This is a breaking change (for subclasses of ChangesListSpecialpage)
due to the signature (and name) change of buildMainQueryConds and
doMainQuery. An alternative that I don't think is a breaking change
would be to put the filter->DB logic in runMainQueryHook, but then it's
doing more than just running a hook.
This is because it used to only build $conds here, but it's clear from
filterOnUserExperienceLevel filters need more than this. I added all
the DB parameters from the hook, but this could be debated.
I have an checked and fixed the WMF-deployed extensions affected by
this.
Other than that, there should be full back-compat (including legacy
filters not using the new system).
* add hidepatrolled/hideunpatrolled to new UI.
* Move userExpLevel from RC to ChangesListSpecialPage. Although for
now the structured UI only displays on RC anyway, when it displays on
watchlist, it seems we'll want userExpLevel there.
Change this to make 'all' exclude unregistered users.
* Don't have front-end convert none-selected to 'all' on string_options.
* Needs the hideanons/hideliu special redirect to be done before this
is merged (T151873)
Bug: T152754
Bug: T152797
Change-Id: Iec2d82f6a830403d1c948a280efa58992e0cdee7