Message params could be an array or another Message object
Message class itself documented with mixed
Change-Id: Ia675ba2d2f5faa73904f90cc26e4f0e2d1317da5
Allowing 3.4 was removed in Ia12658554c94497a204b7f65f1. As explained
there, the removal was not intentional. It was a rebase issue due
to I9e9390975024a2667ce7bf570d0218345 being merged in the meanwhile.
Bug: T235403
Change-Id: I477652c093d5d511d7bbc5980bd7c14babc4ed36
This fixes a fatal error thrown since I12120b51073c, when opening the
Special:ChangeContentModel form, due to a strict string typehint
for SpamChecker.
Bug: T252963
Change-Id: Ie29d7bf5cda4a86321a08a76fb18d747a055420f
Would have love to just kill Linker::normaliseSpecialPage() but
the deprecation policy has to be followed and we'll drop the above
method in 1.36.
For now, we'll just soft and hard deprecate it, also, callers have
been updated.
Dependency inject SpecialPageFactory to LinkRenderer service and
note that ->normalizeTarget() is only for internal use by Linker
& DummyLinker via their `->normaliseSpecialPage()` methods.
Also, updated unit tests to capture injecting the special page
factory class.
Change-Id: I951403c89ff497fd1f7441ad0304dd5bc9442ad7
This method returns null when $mime is 'unknown/unknown' and the file
extension is unknown to MediaWiki. The inline documentation and @return
annotation omitted this.
I don't think this was an intentional design choice, but it's the
existing behavior and I'm not sure it's safe to change.
Since it is the existing behavior, document it and add a test case, to
ensure that any changes to this behavior are intentional.
Bug: T253483
Change-Id: Ie6615a4bd9ae77e9ab59cfe76edb237cace693b1
The name was outdated and also confusing when ending in ".js".
This is internal to the CreateAccount feature (not used elsewhere).
Change-Id: I33778ce2eb69f7b247e6cc80e4de393abaa6946b
This will require some changes to individual skins but the toolbox
and languages portals should be included in the SidebarBeforeOutput
hook. Otherwise two new hooks for adding languages and toolboxes
will be needed.
The mapInterwikiToLanguage,
buildNavUrls, buildFeedUrls and getLanguages functions are moved
from SkinTemplate up to Skin. The bodies of these functions remain the
same with the following changes:
* slight readability tweak inside getLanguages and buildFeedUrls
to simplify the return value.
* buildNavUrls is modified to use a local
variable for thispage rather than the public variable on SkinTemplate.
* title and user cached inside buildNavUrls rather than calling getTitle
and getUser multiple times
* Use the hook service rather than Hooks::run
This will allow us to DRY up every skin which sets these sidebar portals
on when they are not set as well as allow extensions to add items to
the toolbox and language portals just like any other sidebar portal.
https://codesearch.wmflabs.org/skins/?q=TOOLBOX&i=nope&files=&repos=
Note: We will need to make modifications to all skins to remove
their existing hardcoding of these portals.
Bug: T252917
Change-Id: Ie33f85a77299da8f3b98ab8b363761d1f8277708
Also rename image_redirect key to file_redirect while at it.
This assures that stale keys are not still in use.
Bug: T253405
Change-Id: I31a9bb6672b33fbfa1b974955d78fdfd8d58f5da
Use code highlighting where relevant
Fix list syntax in memcached.md to render lists without paragraph breaks
Add a missing period to schema.md
Change-Id: I763cfd479968cedbf952c231283d33b82a0910d6
Some HTML parsers don't deal with this the way we want. libxml does, so
this test case passes, but I'm adding it for if we try switching to a
different HTML parser that breaks this.
Change-Id: I02d14e1d78320217646cda9691a78bcbf2005f52
..and for adding file extensions by modifying the mExtToMime field.
All three interfaces will be deprecated in a follow-up change.
Change-Id: I7ec940a8b2fe02cd0fe01593cd6897f75777a8fa
To improve performance, the watchlist expiry flag was moved to
packageFiles instead of the OutputPage.php file
Bug: T249259
Change-Id: If57030db7d1e90b0890ee2a1ad466772a2f8b8bc
Refactor the URL parsing logic in mw.Title into mw.util.parseImageUrl
and parse the thumbnail width as well alongside the file name.
Also tighten up the thumbnail regexes a little bit.
Bug: T244210
Change-Id: I1e0ff7c2b15aff2e150f4070f3d42803399cb6a2
* We moved to using the Cite extension's resources in 2014
https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/170936
* This unused CSS is just a source of confusion.
* The sub rule is not Cite-specific but since Parsoid doesn't
special-case that tag, it doesn't belong here either.
Change-Id: I753dd0aa969158a23a424f7e7bfcb0e50e710b1b
The problematic code:
$extensions = explode( ' ', $magic->getExtensionsForType( $mimeType ) );
if ( count( $extensions ) ) {
$extension = $extensions[0];
}
If $mimeType is not known to MediaWiki,
$magic->getExtensionsForType($mimeType) will return null.
explode( ' ', null ) is [""]. (Thank you so much, PHP!)
This means $extensions is nonempty (it contains the empty string), so
$extension is set to ''.
Change-Id: Icf387a9c93cb7351c2f48c69f413e7ad2224ba6b
Keys used by multiple wikis should use this key generation method.
It also means settings like "coalesceKeys" in WANObjectCache will
correctly identify these keys as being global.
This change should be deployed on all wikis at once.
Bug: T253405
Change-Id: Ie19613ef7643af92aeb56db203e3d79139143231
Update length in patch-langlinks.sql and fix PK too
Update length in patch-sites.sql and fix PK too
Update length in patch-l10n_cache.sql and fix PK too
Re-use patch-langlinks-ll_lang-20.sql and update
Bug: T253276
Change-Id: I95bef3ef279cb59d54a3127c646a03826fa0da6b
The previous output meant that when reviewing the build output,
it was quite hard to quickly find what the problem was and in
which test because the start of the result (which mentions the
test suite) and the expected/actual diff, were often separated
by dozens or hundreds of lines of "helpful" debug logs.
These are now moved to the after the expected/actual/stacktrace
portion so that "Name of test" and "expected/actual" remain
together.
Before
> 1) ResourceLoaderFilePathTest::testGetters
> === Logs generated by test case
> …
> …
> …
> …
> …
> …
> …
> ===
> Failed asserting that two strings are identical.
> --- Expected
> +++ Actual
> @@ @@
> -'dummy/pat'
> +'bla'
> /var/mediawiki/tests/phpunit/resourceloader/ResourceLoaderFilePathTest.php:22
After
> 1) ResourceLoaderFilePathTest::testGetters
> Failed asserting that two strings are identical.
> --- Expected
> +++ Actual
> @@ @@
> -'dummy/pat'
> +'bla'
> /var/mediawiki/tests/phpunit/resourceloader/ResourceLoaderFilePathTest.php:22
> === Logs generated by test case
> …
> …
> …
> …
> …
> …
> …
> ===
Change-Id: I31f1a4b730a0dd8597a059034b4e6abdc5f48552
See also I20f641a1ff032a6da3549b01dfaf8f4cf1eb5071, which uses this
attribute, and the earlier discussion in the (abandoned)
Ia251d631febf5be7fcad21cd8b73a68ec2785137.
Bug: T133320
Change-Id: I6c74938883376ec17f3790678b435585083a440f