- Replace usage of BaseTemplate::makeListItem() which was
deprecated in 1.35 to using Skin::makeListItem()
- Call Skin::makeListItem() with $this-> instead of self::
as the method isn't static.
- Replace calls to deprecated SkinFallbackTemplate::makeSearchInput()
and ::makeSearchButton() and use Skin::makeSearchInput() and
::makeSearchButton() respectively.
- Stop creating multiple services objects in SkinTemplate::getLanguages().
Create one language name utils object and use in the foreach() loop.
Change-Id: I911672c1d76d35b3b90a8df91bfeabd5e72865df
Doxygen defaults to generate the latex output, it always has been
disabled until babe0874ce which unexpectedly turned it on assuming it
came disabled by default.
Change-Id: Iae38b3816514a11f0c0ae81ab1d840862cc53bd3
Introduces $wgWatchlistExpiryMaxDuration which is used instead of given
expiry if the given exceeds it. This is done in the storage layer. The
reasoning is to control the size of the watchlist_expiry table. Hence,
the max duration does not apply to indefinite expiries (since that would
mean now row in watchlist_expiry).
The frontend is responsible for disallowing expiries greater than the
max, if it choses to do so.
APIs should now pass in $wgWatchlistExpiryMaxDuration as the PARAM_MAX
setting for the 'expiry' type. They should also set PARAM_USE_MAX so
that the maximum value is used if it is exceeded.
Other APIs that watch pages will be updated in separate patches
(see T248512 and T248514).
Bug: T249672
Change-Id: I811c444c36c1da1470f2d6e185404b6121a263eb
* Add a --reblock flag to allow updating existing blocks
* Call the BlockIpComplete hook after blocking
Change-Id: I2daa142e7034c43b01d3e9b8b0304584656b2dae
Currently taint-check is already able to infer this, but this might
change because of T203651. The Title class is just too huge for us to
analyze on-demand without slowing everything down.
Change-Id: I85f2ecf42b51aedda600c5aa7eca88a1d77650bd
Add JavaScript utilities for the infamous "checkbox hack".
The checkbox hack is a prevalent pattern in MediaWiki similar to
disclosure widgets[0]. Although dated, it's surprisingly flexible
allowing for both `details` / `summary`-like patterns and more
complex (to be used sparingly), less component-like
structures where the toggle button and target are in different parts of
the Document without an enclosing element, so long as they can be
described in relation to the checkbox input.
It's complex and frequent enough to warrant a single implementation
for both Less and JavaScript. (The former will come in T252774.) The
JavaScript implementation provided here meets current use case needs for
Vector, MinervaNeue, and likely checkboxtoggle so far as we know.
See source for additional context.
[0]: https://developer.mozilla.org/docs/Web/HTML/Element/details
Bug: T246419
Bug: T252774
Related: Ic9d54de7e19ef8d5dfd703d95a45b78c0aaf791a
Change-Id: I8e153c0ab927f9d880a68fb9efb0bf37b91d26b2
* Add HttpRequestFactory::createMultiClient(), which returns a
MultiHttpClient with configured defaults applied. This is similar to
the recently-deprecated Http::createMultiClient().
* Introduce $wgHTTPMaxTimeout and $wgHTTPMaxConnectTimeout which, if set
to a lower value than their defaults of infinity, will limit the
applied HTTP timeouts, whether configured or passed on a per-request
basis. This is based on the frequently correct assumption that ops know
more about timeouts than developers.
* In case developers believe, after becoming aware of this new situation,
that they actually do know more about timeouts than ops, it is possible
to override the configured maximum by passing similarly named options
to HttpRequestFactory::createMultiClient() and
HttpRequestFactory::create().
* Apply modern standards to HttpRequestFactory by injecting a logger and
all configuration parameters used by its backends.
* As in Http, the new createMultiClient() will use a MediaWiki/1.35
User-Agent and the 'http' channel for logging.
* Document that no proxy will be used for createMultiClient().
Proxy config is weird and was previously a good reason to use
MultiHttpClient over HttpRequestFactory.
* Deprecate direct construction of MWHttpRequest without a timeout
parameter
Bug: T245170
Change-Id: I8252f6c854b98059f4916d5460ea71cf4b580149
Move both search endpoints from coreDevelopmentRoutes to coreRoutes, making them
accessible in a production environment.
Change-Id: I14c1a9eb4c76a22f72caa7ae201699d4ef9eb282
This reverts commit babbbbc6e5.
Reason for revert: Video recording only works with WebdriverIO v5. It doesn't work with v6.
Bug: T252523
Change-Id: I5dd0bb5ef03bcf5337207c63d26755e983634787
This was introduced in r75446 based on r75429. This is not a
benchmark of MW code, but rather a static comparison of how
PHP performs. I'm not sure that's useful to keep long-term.
For what it's worth, anecdotally it seems on PHP 7.2, the caching
might actually be slowing it down. I speculate this might be due
to the simpler variant being easier to optimise, but it hardly
matters as this function now has a very different implementation,
and if something were to call this so often that its runtime
is significant, the caller should probably just avoid doing that
in the first place. Lexical caching tends to be easier to reason
about in the long run, compared to static/unreleased/uncontrolled
caches.
> Running PHP version 7.2.30 (x86_64) on Linux 4.19 (Debian 9 Stretch)
> BenchWfIsWindows::wfIsWindows()
> count: 100
> rate: 208464.4/s
> total: 0.48ms
> mean: 0.00ms
> max: 0.01ms
> stddev: 0.00ms
>
> BenchWfIsWindows::wfIsWindowsCached()
> count: 100
> rate: 163266.0/s
> total: 0.61ms
> mean: 0.01ms
> max: 0.05ms
> stddev: 0.01ms
Change-Id: Iedd273705b88268f1f4d2632913983cbd1028649