| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|
|
|
|
|
|
|
|
| |
UsersPager defines a "join group", which is not supported by
SelectQueryBuilder::tables
Bug: T364428
Follow-Up: I6490caae3984efaae81bd2583220a7dd1c3b371d
Change-Id: I27e4de5d2d114fd8b0bfb86ca28278e16108c959
|
|
|
|
|
|
|
|
|
| |
This cases cannot benefit from the SelectQueryBuilder as each argument
get processed by hooks with fix signature or coming from abstract
functions providing the arguments separate.
Bug: T344971
Change-Id: I6490caae3984efaae81bd2583220a7dd1c3b371d
|
|
|
|
| |
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update cases where one of the IConnectionProvider methods is called
immediately.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: Id0e7d02bab0c570343c2b1f03c70b44ee39db112
|
|
|
|
|
| |
Bug: T330641
Change-Id: I84454d0e42a0faef1b17a79d2ba3cc96db8782ca
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ibe12d1754709d48f71edd4cde1f13a542344a21e
|
|
|
|
|
|
|
| |
This has been approved as part of RFC T166010
Bug: T321882
Change-Id: I6bbdbbe6ea48cc1f50bc568bb8780fc7c5361a6f
|
|
|
|
| |
Change-Id: I79a431c7957cde45b1bfc17d72dcfb311e4e8462
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some non-database tests are currently accessing the database. Fixing
them means either avoiding the DB access if it's possible and makes
sense for the test, or adding the `Database` group otherwise. In
particular:
- Replace global/static functions with services in a couple places to
make testing easier.
- RevisionRendererTest needs to be in the Database group due to heavy
global state usage (including DB) by Parser
- ActionFactoryIntegrationTest and SpecialPageFatalTest should be in
the database group because they test many different classes, and some
of which may use the database in the tested methods.
- SpecialUserLogoutTest must be in the database group because of User.
- Some pager tests are using wfGetDB directly.
Change-Id: I96eb2acf9a2cbfd17e81225db2773d5e8e30260b
|
|
|
|
|
|
|
|
|
| |
The parameter is takes ints too, and apparently $offset != '' does not
guard well enough against offset being zero. The new `if ( $offset )`
check should catch at least `null`, `''`, `'0'` and `0`.
Bug: T313157
Change-Id: Ibf340fd9b4ffddb65cdb1ca4ec227b235906e310
|
|
|
|
|
|
|
| |
No longer used as of I7a31a07a8c3f1e265ac43ab59f23326590b407c3.
Bug: T263127
Change-Id: Ie58c0bb2ed8ff5b0fc6d4e42256010eb825fd9dd
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecated in MW 1.39:
* Ic75bd597b210e14612ca3aebb531b659897e8294
* I4e2f36b543462aa5d852733da650fb70d49ebf06
Hard-deprecated in MW 1.40:
* I09e9203b19e3808af9348db8a889d5e118282230
Change-Id: I17bd8f80e87a04674e826d7966aa3ddb011fc7ba
|
|
|
|
|
|
|
|
|
|
| |
Deprecated in MW 1.39 in commits:
* Ic75bd597b210e14612ca3aebb531b659897e8294
* I4e2f36b543462aa5d852733da650fb70d49ebf06
Depends-On: I8b3adfe907ae16279ec3d480b7eedec5901884f2
Depends-On: I376361bc86a6085fe94a5439b04239ab123a515c
Change-Id: I09e9203b19e3808af9348db8a889d5e118282230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
|
|
|
| |
No longer needed after injection of all services to the pagers
The non-internal getHookContainer function is now deprecated.
Change-Id: I2283c202aba669f42f6fa8c670142faf97c378af
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
|
|
|
| |
This patch only adds and removes suppressions, which must be done in the
same patch as the version bump.
Bug: T298571
Change-Id: I4044d4d9ce82b3dae7ba0af85bf04f22cb1dd347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows similar commits to the objectcache, rdbms, filerepo,
jobqueue components and other areas [1].
* Remove duplicate descriptions from file blocks in favour of class
doc blocks. This reduces needless duplication and was often
incorrect or outdated, and helps (ironically) to make the file header
more consistently visually ignorable.
* Remove `ingroup` from file blocks in class files as otherwise
the file is indexed twice (e.g. in Doxygen) which makes navigation
more messy.
* Fix non-standard `@unstable for implementation` annotations
in favour of `@stable to type` as per T257789 and
<https://www.mediawiki.org/wiki/Stable_interface_policy>.
While at it, fix the only other outstanding uses of `@stable for`
in core as well in a handful of context/, logging/ and search/
files.
[1] https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle
Bug: T257789
Change-Id: Ided3c5ab69e1b587b1b76a3c97a7cdb88f21e130
|
|
|
|
|
|
|
| |
Follow-up to ec79aa394312d62b598ad29601e2c80eaaf0dd19.
Bug: T318080
Change-Id: I87f6b0eee3de884226ff13f54a0638a4629ecf83
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Builds a condition comparing multiple values, for use with indexes
that cover multiple fields, common when e.g. paging through results
or doing batch operations. Can also be to generate a simple comparison
without writing raw SQL (see T210206).
Update a few manually constructed conditions to use this method.
There are more maintenance scripts and API classes that use the
same patterns, but this is a start.
As you can see by the code I'm replacing, there are many ways to do
this. I picked the one used by maintenance/TableCleanup.php, since
I found it the easiest to understand.
Change-Id: Ic368a87fb5ce4c13608b03206cd68518ec9732d4
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Extensions like CheckUser expect IndexPager::makeLink() to be used for
displaying the navigation links of the pager, and it was marked as
'@stable to override'.
If IndexPager::makeLink() is overridden, it will be called instead of
PagerNavigationBuilder::makeLink(). This behavior is considered
deprecated.
Also mark PagerNavigationBuilder::makeLink() as protected and
'@stable to override', to provide a migration path. Users can now
override IndexPager::getNavigationBuilder() to return a subclass
of PagerNavigationBuilder, and override makeLink() on that subclass.
Follow-Up: cfd6ffe7bbadf8177da34460930ca4780bd38524
Bug: T317477
Change-Id: I4e2f36b543462aa5d852733da650fb70d49ebf06
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using `setIncludeOffset( true )`, queries generated by the pager
use `>=` or '<=' for the index field instead of `>` or `<`, in order
to include the specified offset in the results.
However, when the index covers multiple fields (indicated by
`getIndexField()` returning an array or arrays), this must be only
done for the last field. Otherwise the conditions become redundant,
and effectively only the first field of the index is compared.
In short:
(A, B) >= (1, 2)
is equivalent to:
((A > 1) OR (A = 1 AND B >= 2))
and not:
((A >= 1) OR (A = 1 AND B >= 2))
Change-Id: I44f975cdd7b8bdd243b6d5968ee0b8d1cb953292
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had several implementations of almost identical paging links:
* PrevNextNavigationRenderer: The nicest one, somewhat recently added
(4ca72763ec). Unfortunately it was also the least featureful: only
supporting paging by numeric offset and not by index, and not able
to generate "first"/"last" links. Also, I didn't realize that it
exists when working on 94553a1bcb and b95d208340, so it was missing
those changes too.
* IndexPager/ReverseChronologicalPager/AlphabeticPager: These have
been here forever. The most featureful, but not configurable, so
a large part of the implementation was copy-pasted in two classes.
* SpecialWhatLinksHere: Through some accident of history, this one
special page ended up with its own implementation???
They are all replaced to use the new PagerNavigationBuilder.
It may be slightly too much, but I had fun writing it.
Notable changes compared to PrevNextNavigationRenderer:
* Adds <div class="mw-pager-navigation-bar"> wrapper around the
navigation and <span class="…"> wrappers on inactive links
* The current limit link is made inactive
(like the "prev" link when on first page, etc.)
Notable changes compared to ...Pager/...Pager/...Pager:
* Does not generate useless tooltips that contain only the
title of the page, can use custom tooltips
* The current limit link is made inactive
(like the "prev" link when on first page, etc.)
* All links have query parameters in a consistent order:
?title= &... &dir= &offset= &limit= (some of them are optional)
These changes affect many special pages and actions. I tested on:
* Special:Contributions (ReverseChronologicalPager)
* action=history (ReverseChronologicalPager)
* Special:Categories (AlphabeticPager)
* Special:WantedPages (PrevNextNavigationRenderer)
* Special:Search (PrevNextNavigationRenderer)
* Special:WhatLinksHere
Bug: T308364
Change-Id: Ic75bd597b210e14612ca3aebb531b659897e8294
|
|
|
|
|
| |
Bug: T308364
Change-Id: Icf3597604ea100b2fce2f47fe5057cbfd12b96ed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up to ed63ede6575056e1 (Iaa55eab57f76), I didn't think
of this in code review.
In IndexPager, we're not necessarily paging by timestamp, and the
things we're paging might not even *have* timestamps (e.g. consider
CategoryPager used on Special:Categories), so it seems wrong to have
this code there.
(Maybe some kind of headers could be useful, but there's currently no
such use case, and the could would need to be made a bit more abstract
anyway.)
Change-Id: I5263375f0d9dd98fd37c40a1333f4154c2b41e98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Instead of hardcoding rev_timestamp, use the field name from
'mIndexField'. In ReverseChronologicalPager, this should always be
some kind of a timestamp.
Flow rows on Special:Contributions don't actually represent revisions
from a database query, and don't have a rev_timestamp field; but they
have a field with the name defined by 'mIndexField', because it was
needed for compatibility with other core code. It is set here:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Flow/+/c120ce4ec18941b931505d4a896682fb8e388395/includes/Formatter/AbstractQuery.php#221
* Add a way to disable grouping by dates. Previously they only appeared
for pagers that paged by rev_timestamp, but now any subclasses of
IndexPager could have date headers, and most of them don't expect that.
Change the only three pagers that worked before to explicitly opt-in.
* Fix an issue where some pagers had a stray `</ul>` tag at the
beginning due to mismatched getStartGroup() and getEndGroup() calls.
Follow-up to ed63ede6575056e1d8ec3b28d4704152b8366f48.
Bug: T302343
Change-Id: I18822d249b2e04a7408f2cdc5375e84e411ffa26
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These list headers are added to the HTML but hidden by default.
They are needed for the mobile version which displays headers
for better scannability.
However the change will only display on:
* Special:Contributions
* history page
* Special:MergeHistory
Bug: T298638
Change-Id: Iaa55eab57f761c9be780aba79cf2b9b212d91657
|
|
|
|
|
|
|
|
|
|
|
| |
TablePager extends IndexPager to add styles to the page
However, these styles need to be added to the history page
too which uses the HistoryPager where extends IndexPager.
Follow up to I0cba011f0ab8cb8fd59962b5eafb7650deefe841
Bug: T298636
Change-Id: I9648308b1c1eb1a544f138c1fcf5e7cd155d172f
|
|
|
|
|
|
|
| |
All pagers sthould share `mediawiki.pager.styles` module
Bug: T298636
Change-Id: Idb0c7017407cee5c6b625d39c12219d6ddc9e2db
|
|
|
|
|
|
|
|
| |
Because I looked it up, I might aswell commit it.
Moved in 84ce626df616029f1c0b4c24c4b5ee42ff5ca38f
Change-Id: I646aa8a4272a5d93c628c2282b0b4d5a13b68ed9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CommentParser:
* Move comment formatting backend from Linker to a CommentParser service.
Allow link existence and file existence to be batched.
* Rename $local to $samePage since I think that is clearer.
* Rename $title to $selfLinkTarget since it was unclear what the title
was used for.
* Rename the "autocomment" concept to "section link" in public
interfaces, although the old term remains in CSS classes.
* Keep unsafe HTML pass-through in separate "unsafe" methods, for easier
static analysis and code review.
CommentFormatter:
* Add CommentFormatter and RowCommentFormatter services as a usable
frontend for comment batches, and to replace the Linker static methods.
* Provide fluent and parametric interfaces.
Linker:
* Remove Linker::makeCommentLink() without deprecation -- nothing calls
it and it is obviously an internal helper.
* Soft-deprecate Linker methods formatComment(), formatLinksInComment(),
commentBlock() and revComment().
Caller migration:
* CommentFormatter single: Linker, RollbackAction, ApiComparePages,
ApiParse
* CommentFormatter parametric batch: ImageHistoryPseudoPager
* CommentFormatter fluent batch: ApiQueryFilearchive
* RowCommentFormatter sequential: History feed, BlocklistPager,
ProtectedPagesPager, ApiQueryProtectedTitles
* RowCommentFormatter with index: ChangesFeed, ChangesList,
ApiQueryDeletedrevs, ApiQueryLogEvents, ApiQueryRecentChanges
* RevisionCommentBatch: HistoryPager, ContribsPager
Bug: T285917
Change-Id: Ia3fd50a4a13138ba5003d884962da24746d562d0
|
|
|
|
| |
Change-Id: I833052a656b1ce419c0929f6f0514f2a33c2c4cc
|
|
|
|
|
|
|
| |
deprecated since 1.35 and unused
Bug: T274211
Change-Id: If739492953ee53a39c81894c48f16be81c845542
|
|
|
|
|
| |
Bug: T277987
Change-Id: Iafc4b3e3137936046487119b7e17635f4e560277
|
|
|
|
|
|
|
|
|
| |
This is micro-optimization of closure code to avoid binding the closure
to $this where it is not needed.
Created by I25a17fb22b6b669e817317a0f45051ae9c608208
Change-Id: I0ffc6200f6c6693d78a3151cb8cea7dce7c21653
|
|
|
|
|
|
|
|
|
| |
Had to look through git blame to find when it was added (1.34)
for a recent review, would be helpful for others if it was easily
available in a doc block; since I'm adding a doc block, also
add @return
Change-Id: I07c4cdda176f309204fa3c2cfe6c165d1df850af
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: Ie32c1b11b3d16ddfc0c83a757327d449ff80b2e4
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: If560596f5e1e0a3da91afc36e656e7c27f040968
|
|/
|
|
|
|
|
|
|
|
|
| |
For compliance with the new version of the table interface policy
(T255803).
This patch was created by an automated search & replace operation
on the includes/ directory.
Bug: T257789
Change-Id: I5ffbb91882ecce2019ab644839eab5e8fb8a1c5f
|
|
|
|
|
|
|
|
|
| |
This makrs Pager baseclasses as stable for subclassing per the Stable
Interface Policy. This also indicates which of the methods defined by
the base classes can safely be overwritten by extensions.
Bug: T247862
Change-Id: If1e0a35427b55d72c86f8f2530bd47aa4130fa92
|
|
|
|
| |
Change-Id: I346073b59d283029bd6666356c62c81e687ea5e6
|