Commit graph

96595 commits

Author SHA1 Message Date
jenkins-bot
7097484a21 Merge "Make MessageCacheTest::makePage private, return RevisionRecord" 2020-05-22 18:13:17 +00:00
jenkins-bot
e2b06996de Merge "skins: Replace and/or improve usage of some (deprecated) methods" 2020-05-22 17:10:52 +00:00
jenkins-bot
d64ed4171c Merge "Fix typo: 'avalaible' → 'available'" 2020-05-22 15:50:27 +00:00
jenkins-bot
8e4da5bbb2 Merge "maintenance/BlockUsers: Add reblocking and BlockIpComplete hook" 2020-05-22 14:52:03 +00:00
Derick A
bd7baf2d58 skins: Replace and/or improve usage of some (deprecated) methods
- 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
2020-05-22 12:39:50 +01:00
MarcoAurelio
48004c1d60 Fix typo: 'avalaible' → 'available'
Change-Id: I1e3c8a4106f94fa094532874a5ad927f75f5ba76
2020-05-22 11:01:37 +00:00
Antoine Musso
911466fa54 docs: disable GENERATE_LATEX
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
2020-05-22 11:39:44 +02:00
Translation updater bot
7fc72f37a8 Localisation updates from https://translatewiki.net.
Change-Id: Ice9d0ab4e13859fe7bcc07214ca1149271adaa27
2020-05-22 08:33:50 +02:00
MusikAnimal
0694cc02f1 WatchedItemStore: Enforce a maximum watchlist expiry duration
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
2020-05-22 00:15:23 -04:00
jenkins-bot
302a2353fc Merge "http: Document when HTTP timeout settings were introduced" 2020-05-22 00:48:44 +00:00
Bryan Davis
37efd34d1a maintenance/BlockUsers: Add reblocking and BlockIpComplete hook
* Add a --reblock flag to allow updating existing blocks
* Call the BlockIpComplete hook after blocking

Change-Id: I2daa142e7034c43b01d3e9b8b0304584656b2dae
2020-05-21 18:31:16 -06:00
jenkins-bot
fd138ee79f Merge "Support direct editing of tags from Special:Tags" 2020-05-22 00:04:36 +00:00
Timo Tijhof
9a3997316b http: Document when HTTP timeout settings were introduced
Follows-up I8252f6c854b9.

Change-Id: Ie997f9c8fdc196af0da3f785f265c6d6e2e605a5
2020-05-22 01:01:43 +01:00
jenkins-bot
e1162acecd Merge "title: Mark Title::getPrefixedDBKey and ::getPrefixedText as tainted" 2020-05-21 23:49:25 +00:00
jenkins-bot
fa2bb52e9a Merge "Fix typo 'desciption'" 2020-05-21 23:47:36 +00:00
Daimona Eaytoy
a9ba5f98a4 title: Mark Title::getPrefixedDBKey and ::getPrefixedText as tainted
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
2020-05-21 23:31:26 +00:00
jenkins-bot
a02b65e85a Merge "content: Change log channel to 'ContentHandler'" 2020-05-21 23:14:04 +00:00
jenkins-bot
791783637c Merge "Updating psy/psysh (v0.10.3 => v0.10.4)" 2020-05-21 22:54:22 +00:00
jenkins-bot
073dbe9ad3 Merge "Fix native sty name from cебертатар to себертатар" 2020-05-21 22:16:06 +00:00
jenkins-bot
b227bdd42c Merge "Respect configured default HTTP timeouts, and introduce max timeouts" 2020-05-21 20:00:45 +00:00
jenkins-bot
9147222695 Merge "In ApiQueryBase, use a SelectQueryBuilder to store query information" 2020-05-21 19:01:39 +00:00
jenkins-bot
2b2c60ec48 Merge "Move Search endpoints into core routes" 2020-05-21 18:54:39 +00:00
MarcoAurelio
dbfebbbcec Fix typo 'desciption'
Should be 'description'.

Bug: T201491
Change-Id: Ic6d7efb8da2fb1c9645ca4c4e666d10953b8a4ab
2020-05-21 18:42:35 +00:00
jenkins-bot
f40f3e8b27 Merge "Add rawTables(), getQueryInfo() and queryInfo() to SelectQueryBuilder" 2020-05-21 18:18:30 +00:00
jenkins-bot
fe42a67a2c Merge "Use a SelectQueryBuilder in SpecialWhatLinksHere" 2020-05-21 18:16:46 +00:00
Reedy
d6732be43e RELEASE-NOTES: Add entry for explicit visibility modifiers
Change-Id: If3dc9289bbc70d292199d22c74c1074a82b2d709
2020-05-21 08:11:51 -07:00
vidhi-mody
19ba555c71 Selenium: Update to WebdriverIO v6
Update NPM packages: @wdio/* and webdriverio.

Bug: T253306
Change-Id: Id073b4924a00af2078117191d27ba9443dbb67ec
2020-05-21 13:57:40 +00:00
Translation updater bot
8a85f2e0a6 Localisation updates from https://translatewiki.net.
Change-Id: Iabc19176bbb57e720d2cf7e6cc30b54ffd0d9eeb
2020-05-21 08:18:32 +02:00
DannyS712
d349b03db9 Make MessageCacheTest::makePage private, return RevisionRecord
Replace WikiPage::doEditContent with PageUpdater

Bug: T249393
Bug: T250638
Change-Id: I69bfe2c8e47a75171584fd0a984a4f37f88a3d4b
2020-05-21 03:25:05 +00:00
DannyS712
1c8afac4c2 Hard deprecate Revision::insertOn
Soft deprecated as part of the class in 1.31
Includes a fallback to $wgUser

Bug: T251856
Change-Id: I91702f3d541aeae37bf024a27346d7d773c29330
2020-05-21 03:22:05 +00:00
jenkins-bot
f747023504 Merge "mediawiki.page.ready: add checkbox hack JavaScript" 2020-05-21 03:10:31 +00:00
Stephen Niedzielski
f0d2c0f447 mediawiki.page.ready: add checkbox hack JavaScript
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
2020-05-21 02:52:36 +00:00
jenkins-bot
87db98f0f5 Merge "ImportableOldRevisionImporter: Remove use of Revision::insertOn" 2020-05-21 02:39:05 +00:00
jenkins-bot
1d95a5726b Merge "Fix various MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" 2020-05-21 01:25:59 +00:00
jenkins-bot
789088bc40 Merge "objectcache: dependency inject LoadBalancer into SqlBagOStuff" 2020-05-21 01:07:23 +00:00
Reedy
c7eb28aac9 Fix various MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: I50c7c93f1534e966224f98a835ca01f93eb9416d
2020-05-21 01:06:05 +00:00
jenkins-bot
3f2937810e Merge "mime: Convert built-in MIME mappings to PHP arrays" 2020-05-21 01:01:06 +00:00
Tim Starling
504fe2af11 Respect configured default HTTP timeouts, and introduce max timeouts
* 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
2020-05-21 09:30:57 +10:00
Derick A
9ff8d6c96f skins: Followup on I43da8e0fce878560bb692074578
It's actually `->get()` and not `->getConfig()`.

Change-Id: I63900273f150eb6280d16c8a3fea228d6131e144
2020-05-20 23:16:10 +01:00
jenkins-bot
b04b606bcf Merge "RollbackAction: Reduce uses of Revision objects" 2020-05-20 20:49:24 +00:00
jenkins-bot
97bf695d69 Merge "Remove use of Revision objects in SpecialNewpages::feedItemDesc" 2020-05-20 20:14:18 +00:00
jenkins-bot
fedbf6ba82 Merge "Use new TalkPageNotificationManager" 2020-05-20 19:21:52 +00:00
Nikki Nikkhoui
eeac328472 Move Search endpoints into core routes
Move both search endpoints from coreDevelopmentRoutes to coreRoutes, making them
accessible in a production environment.

Change-Id: I14c1a9eb4c76a22f72caa7ae201699d4ef9eb282
2020-05-20 11:52:47 -07:00
jenkins-bot
90d5547799 Merge "Fix impedance mismatch with Parser::getRevisionRecordObject()" 2020-05-20 15:59:53 +00:00
jenkins-bot
f8f275585d Merge "Revert "Selenium: Use wdio-video-reporter to record videos of test run"" 2020-05-20 10:56:53 +00:00
Zfilipin
157a1e3829 Revert "Selenium: Use wdio-video-reporter to record videos of test run"
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
2020-05-20 10:37:09 +00:00
Translation updater bot
fb74decdde Localisation updates from https://translatewiki.net.
Change-Id: Iaabc5b6a5f88b0a60f3ff820a44f390a8b9f375c
2020-05-20 08:33:48 +02:00
Timo Tijhof
b160ffc27f benchmarks: Remove bench_wfIsWindows.php
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
2020-05-20 03:33:49 +01:00
Reedy
3b94e2af1c Narrow MediaWiki.Commenting.FunctionComment.WrongStyle
Change-Id: I95d1195f09a806910559a0c5106d472addd3dec4
2020-05-20 03:33:39 +01:00
jenkins-bot
dadd8687a8 Merge "Update OOUI to v0.39.0" 2020-05-19 23:08:04 +00:00