This change replaces in the HTML of Special:AllMessages
<table class="mw-datatable mw-datatable" id="mw-allmessagestable">
by
<table class="mw-datatable" id="mw-allmessagestable">
Remove unnecessary space at the start of the value of the class
attribute in TablePager.
Inline the one-time used variable
$tableClass = $this->getTableClass()
Change-Id: I4353d47bda3136cd3a8341677a0288f59895d5c6
This hook allows extensions to add additional pages to the list of
pages being exported. For example, if an extension creates supplemental
pages that must be exported along with a content page, this hook will
allow the extension to export the supplemental pages automatically when
the content page is exported.
Bug: T292378
Change-Id: I3b6b466b6ed32b1939674872df9e431bd6941645
This name is consist with the rest of the setter and getter methods
in ParserOutput. Renamed the methods in OutputPage, ImageHistoryList,
ImageHistoryPseudoPager, and ContribsPager as well for consistency;
it also makes chasing down lingering references in codesearch easier.
Soft-deprecated the old name for 1.38. Hard-deprecation will follow,
but there are a number of users in production that should be chased
down first.
Code search:
https://codesearch.https://codesearch.wmcloud.org/deployed/?q=(allow%7Cprevent)Clickjacking&i=nope&files=&excludeFiles=&repos=
Bug: T287216
Change-Id: I9822c60c180d204bd30cb4447a1120155d456da4
MovePageForm is no longer being extended in extensions, thus a fallback
to global state is no longer necessary.
Bug: T259960
Bug: T265945
Change-Id: I585dd8129864a20c844fe4c29943e9d639b5ae2d
Call the UserFactory only for registed users
Changed static property to abstract function similar to
0d48f7d25b
Bug: T277600
Change-Id: I07934d0c1c172c4f7e15d9922c7929a6e8dbc0df
The call to $pager->getNumRows() itself triggers execution of
the database query backing the page, so, that call must be inside
the callback given to PoolCounterWorkViaCallback.
CVE-2021-41800
Bug: T284419
Change-Id: I8b7b41a355be265389a4a8c9ea91301d4e23ae1b
The database result is always a string, cast to int before passing to
getRevisionSizes, which is documented to take int[]
Change-Id: Iead5787a596e0264b769a97f1c79c1abe5c482f4
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
It allowed replacement of the PageArchive object, which is so horrific
that I'm going to have nightmares for a while after seeing that code.
A new hook, PageUndelete, was added to give users something to migrate
to that is also used by API requests etc, and for symmetry with
DeletePage.
This change needs to be in 1.37, since the capability of replacing
PageArchive will be removed in 1.38 by the addition of the UndeletePage
service. Note that in 1.37, errors from the status will not be used
since PageArchive::undeleteAsUser returns false in case of errors.
The only usage of this hook in WMF production (ext:Newsletter) is fixed
in a dependent patch. A non-WMF usage in ext:Video is not fixed since
that one does replace PageArchive and I'd rather not mess with that.
SpecialUndelete has two other similar hooks that pass a PageArchive by
reference, but in those places PageArchive is used as a lookup (not an
undeletion command), so they're not affected by the ongoing undeletion
work, and we cannot deprecate them since we'd have to provide
replacements first. I've left some comments anyway.
Bug: T290021
Change-Id: If434c7ff9de92482f84d535baae5139c18081174
This is just moving code verbatim, removing now-unneeded stuff, and
duplicating tests as well.
Bug: T290021
Change-Id: I540ddaaa11dfabcf0b87b608b151b5e34d199fd8
Also fix docs of ImageListPager::formatValue:
There is no int or Message type, the int is converted to string by
formatNum() and the Message by escaped()
Change-Id: I7cbff8644cd5a92ff2f459adb987a3c076ad648f
mw.Title makes already a capitalizing of the first character based on
the namespace in wgCaseSensitiveNamespaces and also the replacement of
' ' by '_'.
The JavaScript variable wgCapitalizeUploads is not needed anymore.
Change-Id: Ic463c2cd6de51589b3cb61fe532d6f09b1a7d1f8
When using the autoblock IP feature in Special:Block, it is not clear
what the autoblock duratiion is (usually, it is 24 hours).
Add the formatted duration to the message (ipbenableautoblock) used for
the checkbox label.
Bug: T288438
Change-Id: I20f50bf44ad84720c13381980b18f58e36f167db
As part of our wider work on modernising and making more welcoming the
language we use within and around MediaWiki, now is a good time for us
to rename these configuration variables:
- $wgFileBlacklist is now $wgProhibitedFileExtensions
- $wgMimeTypeBlacklist is now $wgMimeTypeExclusions
- $wgEnableUserEmailBlacklist is now $wgEnableUserEmailMuteList
- $wgShortPagesNamespaceBlacklist is now $wgShortPagesNamespaceExclusions
Bug: T277987
Depends-On: I91e065c58fda144a722a41cf532e717f962d7a64
Change-Id: I558a8b20d67d48edccce0d065aec2d22992e9dda
Adjust UI to be more explicit about which options apply
to sitewide vs partial blocks
Bug: T280719
Change-Id: I38943124c7f3c1aeb4ea8c9b92971a8f59801205
This helps phan to detect unreachable code and also impossible types
after the functions.
It helps phan to avoid false positives for array keys
when the keys are checked before
Bug: T240141
Change-Id: I895f70e82b3053a46cd44135b15437e6f82a07b2
This patch injects services into WikiExporter. It also adds a
WikiExporterFactory service for creating WikiExporter instances.
Change-Id: Ib1547defea54c309865c116bc83d617c21568843