| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follows-up I1b9435dcdacd952b, which introduced this and silenced the
warning, but it appears this warning is spot-on:
> $ composer phpcs
> …
> assertEquals accepts many non-zero values, please use strict alternatives like
> assertSame (MediaWiki.PHPUnit.AssertEquals.Int)
We don't want to tolerate something like this:
```
var_dump(1 == true);
class Foo{}
var_dump(1 == new Foo());
var_dump(1 == (object)[]);
var_dump(1 == new stdClass);
var_dump(1 == '01.0');
var_dump(1 == '01.');
var_dump(1 == '01');
var_dump(1 == '1');
```
Bug: T368740
Change-Id: Ib3966b96f65d41b1d320ae043dcbea1a445a55f5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These .htaccess files are intended to prohibit all web access. But if
the user sets "Satisfy Any" on a parent directory, in conjunction with
any permissive require directive like "Require all granted", access will
be allowed despite "Require all denied" in .htaccess.
So, override Satisfy so that the "Require all denied" will reliably take
effect.
Note that "Satisfy All" is the default. This only affects non-default
installations.
Change-Id: Ia5862fb69e439b7ea2ed7af011e1ebf8f1b1f6d6
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: T390735
Change-Id: I0ebec537bb15925e8507ee6934cd4a17973c536a
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- When accessing Special:GlobalContributions, if the target to look for
ends with a whitespace, the page returns no results, showing an error
stating that the target is not a valid user name instead. To test it,
you can provide a target ending with a whitespace in the URL, like
?title=Special:GlobalContributions&target=172.22.0.1+&namespace=all
(note the plus sign at the end of the target).
- When accessing the page, different code paths seem to expect having
the user name provided in different ways (reading it from the request
itself, getting it passed as a value, or reading it from the
controller's $opts attribute).
What:
- Cleanup the target before the actual logic for the contributions
special pages starts, making all contributions pages (including global
contributions) read the user name after stripping the leading and
trailing whitespaces, if any.
Bug: T378279
Change-Id: I9f6a0d70d2d967cf5ec33c77bffa89c90fb81e25
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a library providing date/time formatting according to the user's
preferred time zone and date preference.
I tested formatting of an example date with all defined formats in all
languages, and I found that it gives identical output to PHP in about
90% of our ~500 languages.
Resolve some of the outstanding issues by aliasing the problematic date
formats on the client side, so that the user will see the date in
another acceptable format for the same language.
The remaining issues mostly relate to the use of a fallback language to
display weekdays and non-Gregorian month names.
Details:
* Add Language::getJsDateFormats(), which converts existing date formats
to an options array that can be interpreted by the client.
* In Messages*.php, add $numberingSystem, which is the CLDR numbering
system ID. I set it for all languages that had overriden
$digitTransformTable. This is sent to the client in the library's JSON
config and is used as the default numberingSystem option when
formatting dates.
* In Messages*.php, add $jsDateFormats, which overrides the
automatically generated date format options.
Bug: T389161
Change-Id: Ib6bc8ebd4d01317aaf32225c6006ea2dc7a1b39e
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add $auto parameter to DatabaseBlockStore::newFromTarget and
::newListFromTarget, to help callers filter autoblocks from result
lists.
Change-Id: Iad92d205517eb50ab0ce5e8caae58ee761fe19d5
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Why:
- ParserCache refuses to return cache entries for redirect pages. So we
shouldn't write these entries into the parser cache in the first
place.
- If we write but refuse to read, this means there will be a cache write
every time a redirect page is retrieved via ParserOutputAccess.
What:
- Make ParserCache:save() skip entries for redirect pages. This is
only reachable via "redirect=no" since by default MediaWiki
pageviews render the destination page instead.
Note:
- It seems we should be able to store redirect pages like any other
page in the ParserCache. Why we didn't, and whether we should, is
not yet clear. While this is being investigated we should establish
consistent behavior for get() and save().
Bug: T389591
Change-Id: I880997193d6de66121c902de80a77c1305bd01d3
|
|\ \ \ \
| |_|_|/
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There are dedicated classes and methods for this. No need to redo the
same manually.
Change-Id: I75f5c1f0911f5fcdc63414943747cb3fca664a8e
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I56b31870ce9be46d15fcd9095f9a12e0f2488ed9
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When MediaWiki creates load.php URLs, in OutputPage and via RL\Client,
it sets 'lang', not 'dir'. The direction is automatically derived
from the language, which makes the library easier to use for developers,
and also avoids a potentially confusing scenario in which the two
are different (e.g. lang=he and dir=ltr would not make sense, and
would further risk poisoning LTR content in an RTL/Hebrew-related
cache somewhere).
Bug: T225845
Change-Id: I14905c85bb5e3bb47a681dc99668b92844d22f04
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | | |
Bug: T387255
Change-Id: I3c39db9d8394254b94f0828de0df4fb57e8d49e7
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These already don't work in modules with packageFiles since these are
invalid under CJS/require interop, but to remove any chance of ambiguity
or confusing error messages client-side, let's also validate these
early server-side, so that we can assume no such module can exist.
Bug: T386833
Change-Id: I854079bb8c56e0b7adc899769bc365bf31226a05
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A previous change to add localization strings for the REST extra
routes module was inconsistent between the en/qqq json files and
the message name in php, causing the strings to display incorrectly
in the REST Sandbox. Fix so the messages display correctly.
Bug: T385855
Change-Id: I6c8d825a98ee36218cd23e3945c42010c9bd5ef3
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Update a few remnant references inside the library while at it.
* WANObjectCache: Didn't use ATTR/QOS directly, and getQoS test
already implemnented as BagOStuff const.
Update getQoS() docs to match.
* WANObjectCache: Already documented ERR_ as BagOStuff::ERR_.
And Codesearch confirms no use of `WANObjectCache::(ERR|ATTR|QOS)`.
* MemcachedClient: Switch from referencing one to the other.
The class is not directly used outside core, only via
BagOStuff.
* Implicitly remove unused ATTR_EMULATION by not carrying over.
Follows-up:
* e8275758fe (I20fde9fa5c) Split IExpiringStore from BagOStuff,
and re-use in WANObjectCache.
* 74be3a0150 (I4377fc3f53) Move ERR_ from BagOStuff to IExpiringStore.
* 69950da666 (Ia862c5111a) Replace IExpiringStore with StorageAwareness.
* 59b002b866 (I9885f53f00) Remove StorageAwareness::QOS_LOCALITY_.
* ec90b543ab (I8dec3f73fa) Remove StorageAwareness::QOS_EMULATION_SQL.
* 62bdd78817 (I5649a29310) Adopt ERR_ in MemcachedClient.
* e5a3e36bd1 (I836735b1fe) Mark StorageAwareness as internal.
Bug: T353529
Bug: T364652
Change-Id: I1dfde995e29d5264611cf3500d61fe4d8631a7d7
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This follows-up Ie309e761f (53a3c8b417), in which we switched from
calling JsMinPlus/JSParser (which took $fileName as argument, and
throw an exception that already included "on line N in X.js")
to calling Peast.
That patch formatted the error as "on line N" but forgot to include
"in X.js".
Test plan:
* Log in as admin and create "MediaWiki:Common.js" with "foo/;",
which is invalid syntax. Then browse the main page and check the
browser console.
* Before: "Parse error: Unexpected: ; on line 1"
* After: "Parse error: Unexpected: ; on line 1 in MediaWiki:Common.js"
While at it, document why this cache key is not purely MD5-based,
but also includes wiki and page title.
Change-Id: I16c3b1dacd02ee26a254809e6a9ac60f72aba4da
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
deprecated in 1.38"
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
deprecated in 1.38
The following functions were removed:
- FormSpecialPage::preText
- FormSpecialPage::postText
- HTMLForm::getPreText
- HTMLForm::setPreText
- HTMLForm::addPreText
- HTMLForm::getPostText
- HTMLForm::setPostText
- HTMLForm::addPostText
- HTMLForm::getHeaderText
- HTMLForm::setHeaderText
- HTMLForm::addHeaderText
- HTMLForm::getFooterText
- HTMLForm::setFooterText
- HTMLForm::addFooterText
Bug: T325474
Change-Id: Id8a05542fc56db52f3a5141a1b2125c1a602cf3c
|
|\ \ \ \ \ \ |
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The following functions were removed:
- ApiPageSet::getTitles
- ApiPageSet::getGoodTitles
- ApiPageSet::getMissingTitles
- ApiPageSet::getGoodAndMissingTitles
- ApiPageSet::getRedirectTitles
- ApiPageSet::getSpecialTitles
Bug: T339384
Change-Id: Iba8499c2d1b4a10b918f563069534b90fed7f6f9
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: T339394
Change-Id: I4c7dd048913ee3d62982ec3bcbdb37548bd56280
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This patch migrates the `MediaWiki.jobqueue` metric to the new
Prometheus format.
Bug: T359472
Change-Id: Ie1d54721a1849619fe9a33b74ad1c231868b1c26
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: I215eb8cccd50472b4fcb0f41ce1710d8ff9ca8fc
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Why:
- PageStateEvent models a change in page state, so it should provide
access to the state before and after
What:
- add getPageRecordBefore() and getPageRecordAfter() to PageStateEvent
- Move getPage() from PageStateEvent down to PageRevisionUpdatedEvent.
- Add getPageId() to PageStateEvent.
- Add getDeletedPage to PageDeletedEvent
Bug: T388588
Depends-On: I76b09f2275a74d02e5701de2082d6b256d6b3b78
Change-Id: I94c52c0314e5dbe9adf82aab732f2e54ca42f686
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: T353458
Change-Id: I3e829e35c93bcaae75e401b1801bddf93c0b416c
|
|\| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Bug: T353458
Change-Id: I3cf44dfe5425f2efb8409c83571c427447b053af
|
|\| | | | | |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be
changed later if people really care). Also, move the couple of exceptions in
here that were already namespaced in the MW-top-level into the new space.
Bug: T353458
Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
|
|\ \ \ \ \
| |/ / / /
|/| | | |
| | | | | |
entries in Recent Changes and Watchlist in non-grouping mode"
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
in Recent Changes and Watchlist in non-grouping mode
Bug: T148533
Change-Id: I33d3f186c1b59c2fa1a0ed7c588ed14e63a49559
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The OutputPage::getOutputFlag(...) method should be used instead.
Bug: T301020
Change-Id: I3b5a76d30e88da1f29e50689cfab7d05ff83e43f
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In preparation for moving the module lists to OutputPage::$metadata,
deprecate the additional parameters to OutputPage::getModules() and
OutputPage::getModuleStyles(); refactoring the actual implementation
to a new private method OutputPage::getModulesInternal().
Bug: T301020
Change-Id: Iea1a40fed68d3b61b8decf9ab838391b1477ff95
|
|\ \ \ \ \ \ |
|