| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows up Ia03038e86c6a607c8b75eefedbf0285ca1a2f8c8.
* Only generate a rollback link for the latest revisions in
ContribsPager.
* Gate the entire ChangesList::insertPageTools beind the RC
attribs check, not just the rollback link generation.
* In ContribsPager::formatRow, check for the existence of $page in
a more reasonable place. This was already broken before Ia03038e
so I suspect $page is never null in practice (in theory, a
ContribsPager__reallyDoQuery hook handler could somehow produce
a $row with no title information), but it can't hurt.
* Add some documentation and FIXMEs.
* Remove a comment from ChangesList - part of it is not true
anymore after Ia03038e, part of it already didn't make sense
before that.
Bug: T51541
Bug: T325753
Change-Id: If848e38b568492579382a2c920cb865fb0326d99
|
|
|
|
|
|
| |
New feature from PHP 7.4
Change-Id: Ifa7a9bc7b2ec415ad7ecb23f4c1776f51f58fd6b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The motivation is to make the code less confusing. I hope this is the
case.
?? is an older PHP 7.0 feature.
??= was added in PHP 7.4, which we can finally use.
Change-Id: Id807affa52bd1151a74c064623b41d950a389560
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The history page renders an extensible list of tools for each
change list row. I've factored this code out so that it
can also be used on other pages that use the Pager class.
This generalizes the logic for the rollback link and makes sure
the control is standardized across pages. It also allows
the onHistoryTools hook run. I suggest we rename this to something
more generic in a follow up.
Right now usages of onHistoryTools are low but there should be
no issues with running it on more than the history page. One of
the benefits of this is the thanks link will now show on the
contributions page, watchlist and recent changes.
Bug: T51541
Change-Id: Ia03038e86c6a607c8b75eefedbf0285ca1a2f8c8
|
| |
| |
| |
| |
| |
| | |
PHP does this implicitly.
Change-Id: I009a7c93d44fb5e8c430c971cfc637fa04a8e68d
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The result of the method has been inappropriate and
surprising since rc_patrolled was changed to distinguish
between manually patrolled and autopatrolled changes
(T184791).
When called with $auto = true, it would mark the change
as manually patrolled (not autopatrolled), but it would
not log it as such in patrol log and would still require
'autopatrol' right (not 'patrol').
Change-Id: I0bd6f2cf317d2b1c8dd50b7998724a57f5f549fb
|
|/
|
|
|
|
|
| |
This feels like a no-brainer unless I'm missing something obvious
Bug: T321882
Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
|
|
|
|
|
|
|
|
| |
Introduced in PHP 7.1. Because it's shorter and looks nice.
I used regex replacement.
Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
|
|
|
|
|
| |
Bug: T166010
Change-Id: Icdbe003e74d2f31b68b575acfa94c09c24d7aed5
|
|
|
|
| |
Change-Id: Id2d91e30a6f7cc4eb93427b50efc1c5c77f14b75
|
|
|
|
|
|
|
|
|
| |
Follow up to I14c6c22d822ae4
Fixes a warning on php 8.1 where the comment on log entries
might be null.
Change-Id: If0e41f0696a24a56f112e05c46a9a7fdbfaa3aaa
|
|
|
|
|
|
|
|
|
| |
It is not possible to set $wgUseEnotif on LocalSettings.php,
because it is always set on setup, it should not be a global/setting.
Just remove it from the dynamic setup and use the config it is set from
Bug: T305093
Change-Id: I9bfa502a0b9798bd149b4cfe4db86a0461e76f55
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Explict types helps phan to detect errors with keys like ef82d95
Change-Id: Iee4d964ecc58273eb9c73356ed34e13f29fbd275
|
| |
| |
| |
| | |
Change-Id: I9d0b95ebc8c37380b5a1f2ac2eb8e55b6707e1e6
|
|/
|
|
|
|
|
|
|
| |
Pass along a revid to category changes on Special:RecentChanges
This change allows IPInfo downstream to pull the revid for use in
its subsequent API call
Bug: T310813
Change-Id: I533d5fffd64dc741d5b28563f9e0c0827a48906c
|
|
|
|
|
|
| |
The special type of the column was changed in 6809067
Change-Id: I308df77f3ab39ddddf6219e6c292ab50ec4bbc22
|
|
|
|
|
|
|
| |
The optimizer is refusing to pick the right join order
Bug: T311360
Change-Id: I742201b45975a5edcac5d4634d70d50ee851f0ac
|
|
|
|
|
|
|
|
| |
It should avoid using straight join when there is a condition on the
actor table which potentionally could make the query faster.
Bug: T311360
Change-Id: Iad3d0cf2479c560be255f85d8896f37efae606c5
|
|
|
|
|
|
|
|
| |
Add action links for deletion and protection on Changeslist.php.
This will make links more consistent with the log page entries.
Bug: T49466
Change-Id: Ic1fdb2b4280bdeac521323aafe4548819778c870
|
|
|
|
|
| |
Bug: T296083
Change-Id: I6744ed237fb30aec5540eb68140ab6f8c5d71246
|
|
|
|
|
|
|
| |
This covers all occurrences of /onfig->.*get( '/ in includes/.
Undoubtedly there are still plenty more to go.
Change-Id: I33196c4153437778496f40436bcde399638ac361
|
|
|
|
|
| |
Follow-Up: I08f14f712479e1b170c606e2b64857f8386acd76
Change-Id: I63b6f484bf498a9bbe574eaac66f89b4e045c0e2
|
|
|
|
|
|
|
|
| |
Part 1, proof of concept. Hundreds of files left to go. These changes
brought to you in large part by vim macros.
Bug: T305805
Change-Id: I44789091e9f6394c800a11b29f22528c8dcacf71
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I65add7ed5e9aa95d1a626faaff05b94154ddf027
|
|/
|
|
|
|
|
|
|
|
|
| |
Make phan stricter about array keys
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T304887
Depends-On: I3105a5fd4826f8667b5232834defc5ec93be32a1
Depends-On: Ie9610a6e83731468311edb3ed17f80fc509de385
Change-Id: I701f12ab94478c3b8e7fd82110ade74a8e6b04ef
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 39a6e3dc4d (I8be497c623c5d92).
* Improve documentation all around and advertise 'class'
everywhere instead of 'uri'.
* Add test coverage for RCFeed::factory().
* Deprecate the $wgRCEngines "uri to class" mapping in favour
of specifying "class" directly in $wgRCFeeds.
* Deprecate RCFeedEngine in favour of FormattedRCFeed.
Convert to class_alias so that UDPRCFeedEngine no longer has
to extend the deprecated class name explicitly (for instanceof compat).
* Hard-deprecate RecentChange::getEngine.
Bug: T250628
Depends-On: Ie939e1d06b9ee2d841ec7256c8d24cc4e7e386dd
Change-Id: Ib6758d724c7200404c89c7ab157aa55f1cad9763
|
|
|
|
| |
Change-Id: I2eb133a9e32116cd155f59086245bc4d15ecbfcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out this gets rid of a bunch of suppressed
"SecurityCheck-DoubleEscaped" that appear to have been accurate
warnings.
There seems to have been some confusion about how ::truncateForVisual()
is supposed to be used; in particular it is to be passed *unescaped*
output, because it is not (generally speaking) safe to truncate
HTML-escaped strings. The goal of ::truncateForVisual() is to have
a specific number of codepoints in the output for display purposes,
the encoding of those codepoints is not an issue (htmlspecialchars
can be applied to the *return value*.) If you need a specific number
of *bytes* you should be using ::truncateForDatabase(). If you want
a certain number of *HTML bytes* then the ::truncateHtml() method
is probably what you want.
Slightly refactor some code in RevDelLogItem to avoid a false positive.
Bug: T301205
Bug: T290624
Change-Id: I893362e049aedfa699043fcf27caf4815196f748
|
|
|
|
| |
Change-Id: Icdb301d352d302f70fefba9b40df2368cb217fd2
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow up to I0cba011f0ab8cb8fd59962b5eafb7650deefe841
This class is usually used for dates.
In Special:Contributions an additional class is used for times
so let's use that here.
This will be helpful for T219349
Change-Id: Ibd5cff5cc37bec8eb840d7f0479fcb4eb8346611
|
|
|
|
|
|
|
|
| |
When the called function has a doc of int, it should be cast to be
explicit here.
Also cast for arithmetic operations to be explicit about the number
Change-Id: I905b78dfb66e66443e0e3203488bab5b548db543
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T298639
Change-Id: I0cba011f0ab8cb8fd59962b5eafb7650deefe841
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Automatically refactors wg prefixed globals to use MediaWikiServices config using Rector. Doesn't include files that set globals or files that fail CI.
Rector Gist: https://gist.github.com/tchin25/7cc54f6d23aedef010b22e4dfbead228
* This patch uses a modified source code rector library for our specific use case and the rector will have different effects without it.
A writeup for future reference is here: https://meta.wikimedia.org/wiki/User:TChin_(WMF)/Using_Rector_On_MediaWiki
Change-Id: I1a691f01cd82e60bf41207d32501edb4b9835e37
|
|
|
|
| |
Change-Id: I568fb93b53feb83f026d485136dd0d116d677f4f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Using static:: and not self::,
because subclass EnhancedChangesList already calling it that way
Change-Id: Ibc57bf9bbfdb86a0fe6a7dd18e9ff730b882dab5
|
|/
|
|
|
|
|
|
| |
Nothing to learn from these.
You can find a longer explanation in the comments in I93751e6.
Change-Id: I195aae70fc282b58be5b18160783f27d38605d15
|
|
|
|
|
| |
Bug: T42786
Change-Id: I8bda0c281e1f4abbffbddb80ac74a6d61a034d28
|
|
|
|
|
|
|
|
| |
For comment and content the class mw-history-suppressed is added
additional, should be the same for the user.
Follow-Up: I08f14f712479e1b170c606e2b64857f8386acd76
Change-Id: I7d477913952b9cc67314d1ec96f83db2846a74cb
|
|
|
|
|
| |
Bug: T254646
Change-Id: I096b2cf738a1395a14f1d47bcbed0c2c686c2581
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following User methods, deprecated in 1.35, have been removed:
- ::isIP,
- ::isIPRange,
- ::isValidUserName,
- ::isUsableName,
- ::isCreatableName,
- ::getCanonicalName,
- ::addAutopromoteOnceGroups,
- ::getDefaultOptions,
- ::getDefaultOption,
- ::getOptions,
- ::getBoolOption,
- ::getIntOption,
- ::setOption
- ::listOptionKinds
- ::getOptionKinds,
- ::resetOptions,
- ::getEffectiveGroups,
- ::getAutomaticGroups,
- ::getFormerGroups
User::GETOPTIONS_EXCLUDE_DEFAULTS has been removed, since it is used only in the description of User::getOptions.
Bug: T277511
Depends-On: Ida05c22f81b30d9b46678e8ede3d531c38855d83
Change-Id: I72bbc2336f8ddbc66ce67226cd2d5baaa2f807d8
|
|
|
|
|
|
| |
Change documentation to null or false where the type is allowed
Change-Id: Ibc17388c065605defed0d3f0998971c9987ff63f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: I48161585de6f329ec4037156234e0b07b3b837e6
|