Commit graph

106484 commits

Author SHA1 Message Date
jenkins-bot
f0123b83b5 Merge "Make ArchivedRevisionLookup a service" 2021-10-20 18:51:32 +00:00
jenkins-bot
91a9e2db75 Merge "Move methods from PageArchive to new ArchivedRevisionLookup" 2021-10-20 18:47:42 +00:00
jenkins-bot
c61a9dfd5c Merge "Do not cache private wiki completion results" 2021-10-20 18:47:36 +00:00
jenkins-bot
5680816a08 Merge "import/export: Add documentation for nullable arguments" 2021-10-20 18:47:28 +00:00
jenkins-bot
e875b742e2 Merge "HistoryBlobStub: add getLocation() to get $mOldId" 2021-10-20 18:42:25 +00:00
jenkins-bot
24373dab6b Merge "Replace Content::getParserOutput call to ContentRenderer::getParserOutput" 2021-10-20 17:56:19 +00:00
jenkins-bot
9065442e54 Merge "Don't pass nulls to CommentFormatter::formatStrings" 2021-10-20 17:51:36 +00:00
jenkins-bot
a5384e5f7f Merge "Register omitted tracking categories" 2021-10-20 17:51:26 +00:00
jenkins-bot
a42e686602 Merge "mediawiki.action.edit.preview: Use same UX as in normal diff" 2021-10-20 16:55:21 +00:00
Fomafix
b4e9c1cdf9 mediawiki.action.edit.preview: Use same UX as in normal diff
This change fixes the following differences and bugs compared to the
normal diff:

* On an empty change the API response contains no `main` in
  `response[ 0 ].compare.bodies`. Remove the previous diff and show a
  'diff-empty' message in this case.
* The header with 'currentrev' and 'yourtext' is missing. Show this
  message similar to the normal diff.

The HTML in the diff of the live preview is not exactly the same as in
the normal diff:
* The live preview has now <thead> and <tbody> elements.
* The live preview has always 4 columns.

Bug: T293307
Bug: T293597
Change-Id: Ibb4fccb74634094ffeabf6fe201257d747bb8a01
2021-10-20 14:24:22 +00:00
Petr Pchelko
cf4b335aaf Don't pass nulls to CommentFormatter::formatStrings
Bug: T292797
Change-Id: I00607ef2a65076a34f99d2f5fdc658e1c6e11832
2021-10-20 06:56:13 -07:00
Roman Stolar
fa5237eb48 Replace Content::getParserOutput call to ContentRenderer::getParserOutput
Bug: T287158
Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
2021-10-20 12:11:24 +03:00
Translation updater bot
aa4d25ce15 Localisation updates from https://translatewiki.net.
Change-Id: I3f2f772e91197d33990f4d9685555dfe1d0a111b
2021-10-20 08:20:16 +02:00
jenkins-bot
c55307829c Merge "Use correct default value when calling Status::getWikiText" 2021-10-20 02:36:11 +00:00
jenkins-bot
4454ea3b9c Merge "mediawiki.util: Improve docs with updated examples from wiki page" 2021-10-20 01:54:59 +00:00
jenkins-bot
c0844fae83 Merge "mediawiki.page.ready: Fire hook 'wikipage.indicators' with children" 2021-10-20 00:45:42 +00:00
jenkins-bot
38c3844213 Merge "resourceloader: Replace outdated references to "globalEval"" 2021-10-20 00:31:41 +00:00
Fomafix
8bec93a573 mediawiki.page.ready: Fire hook 'wikipage.indicators' with children
The parameter of the hook 'wikipage.indicators' in mediawiki.page.ready
and in mediawiki.action.edit.preview was inconsistent:

* mediawiki.page.ready fired the hook with the root element.
* mediawiki.action.edit.preview fired the hook with the children
  elements.

This should be consistent.

mediawiki.action.edit.preview fires the hook before adding the elements
to the DOM. Therefor it can't fired with the root element before adding
to DOM. To be consistent the behavior in mediawiki.page.ready must
changed to the behavior in mediawiki.action.edit.preview.

Also remove the text nodes with the newline from the value in
mediawiki.action.edit.preview to be consistent with the value in
mediawiki.page.ready.

This change is a follow-up to bea70565d9.

Bug: T293564
Change-Id: Ie8890e6396db071975794655c4e4ec3616891f96
2021-10-20 00:24:24 +00:00
DannyS712
10d63f057b resourceloader: Replace outdated references to "globalEval"
Since T192623 the startup code has used its own function,
domEval, instead of relying on the jQuery globalEval method.

Follow-up: Icdd5d76546a6c265a8e941c4e9b28f73bf9dd028
Change-Id: Ic1d0e02597c3e335acb7e0407e077dd4e62f3982
2021-10-20 00:11:48 +00:00
jenkins-bot
ca32b46557 Merge "mediawiki.Title: Regenerate phpCharMappings against plain PHP 7.2" 2021-10-19 21:23:40 +00:00
Petr Pchelko
c7a1e792d0 mediawiki.Title: Regenerate phpCharMappings against plain PHP 7.2
After the unicode migration from HHVM-like to PHP 7.2 (T219279),
MediaWiki is running in production with default PHP 7.2 unicode, so
some of the char mappings overrides for mw.Title are no longer
nesessary, since PHP is now closer to JS.

Bug: T219279
Change-Id: Ic487c55b09ff81c1b7878651342d793982814a3e
2021-10-19 20:59:54 +00:00
jenkins-bot
03d5277a26 Merge "Replace deprecated JobQueueGroup::singleton in JobQueueEnqueueUpdate" 2021-10-19 20:32:30 +00:00
Timo Tijhof
8a48323f46 mediawiki.util: Improve docs with updated examples from wiki page
Add some of the hardcoded examples on the [[mw:RL/DM]] wiki page here
and improve the docs a bit overall, in prep for removing those sections
in favour of the API docs link, as we do for most other modules already.

This is quite possibly the most used module, and for some reason we
never integrated it into the rest of the docs :)

Change-Id: I7f255e87e65f11cde25ce4476bb9f25e289cf16c
2021-10-19 21:20:17 +01:00
jenkins-bot
3c697fd5ee Merge "api: Inject services into ApiQuery class" 2021-10-19 20:16:07 +00:00
jenkins-bot
fca74c9c17 Merge "media: Add missing false return types to doc" 2021-10-19 20:09:51 +00:00
jenkins-bot
1b3285578e Merge "Change User::isAnon to !User::isRegistered in PageEditStash" 2021-10-19 20:09:45 +00:00
Umherirrender
b1e1a11ca6 Replace deprecated JobQueueGroup::singleton in JobQueueEnqueueUpdate
Fix documentation and type hint in JobQueueEnqueueUpdate

Change-Id: I68487d0c44ed4f3064455f79f36ce896e8eff143
2021-10-19 20:09:02 +00:00
jenkins-bot
8a5bc391aa Merge "Use LocalFile::getHookRunner instead of LocalFile::hookRunner" 2021-10-19 20:06:25 +00:00
Universal Omega
2708a82ea0 HistoryBlobStub: add getLocation() to get $mOldId
For use in the checkStorage and resolveStubs maintenance scripts, in order to fix them.

Follows-Up: Id1f530c2c8ec1171615f726dc7446431ee7ca8fe
Change-Id: Iade3d1660f2b7db62f829f5e5ca94372614ae7e5
2021-10-19 18:23:30 +00:00
Umherirrender
5018000e35 Change User::isAnon to !User::isRegistered in PageEditStash
Also use another variable for the full user object to make clear which
parts needs it and which part is fine with an UserIdentity

Change-Id: I8422159a462cc54b54006a44e7b46079919691ad
2021-10-19 20:05:35 +02:00
Petr Pchelko
2ae3e55f64 Remove Title dependency from RenderedRevision
Change-Id: I8da86277e0c8406a49ebd86faddf3dc2abbf5328
2021-10-19 07:53:26 -07:00
Petr Pchelko
66e58d1ea7 wfParseUrl: rely on parse_url for proto-relative urls
On July 12 2011 in df2306b97 Roan added this workaround
for parse_url lacking support for protocol-relative URLs.

In 2012 PHP 5.4.7 came out, that added support for
protocol-relative URLs to parse_url, see [1].

It's 2021, and after a decade of honorably serving our
community, this workaround can be now be retired.

It's not a simple deletion since we have custom 'delimiter'
bit that wfParseUrl returns, and we need to keep supporting
that.

[1] https://bugs.php.net/bug.php?id=62844
Change-Id: If9b3bb2a51afa7af1ba8e674eadaa8db4f6f33f9
2021-10-18 20:30:29 -07:00
jenkins-bot
6210feb3db Merge "ApiQueryBacklinks: Simplify getAllowedParams returns" 2021-10-18 23:02:15 +00:00
drynok
9b202c52f4 Change WatchedItemStore to cache an array instead of MapCacheLRU
Updated the closure in WatchedItemStore::resetNotificationTimestamp() to return
an array obtained from MapCacheLRU->toArray(), instead of an object.
Updated the two places that fetch from the cache to read cache entries in either format,
for backwards compatibility.

Added testResetNotificationTimestamp_stashItemTypeCheck test to
WatchedItemStoreUnitTest which verifies correct behaviour with
cache values supplied by the test case.

Bug: T282105
Change-Id: Ibfe4c205ffdf7af7087f6f862004b95b29bdc394
2021-10-18 13:00:03 -07:00
jenkins-bot
6fd447783a Merge "Make PageEditStash::checkCache() accept an UserIdentity" 2021-10-18 19:20:11 +00:00
Umherirrender
226264adfa Use LocalFile::getHookRunner instead of LocalFile::hookRunner
Do not depend on File::__get()

Follow-Up: Iaa84edfe215e71d3d5fd814053d4b787652fa3b5
Change-Id: Ib344a2fa7681e176de863d99e8df13ec37eb143d
2021-10-18 17:50:05 +00:00
jenkins-bot
c20a33cade Merge "objectcache: Change variable name from master to primary" 2021-10-18 17:43:17 +00:00
jenkins-bot
04acc6d8a9 Merge "Add the Farefare language (gur) to Names.php" 2021-10-18 16:55:53 +00:00
jenkins-bot
7592511876 Merge "block: Stop passing list of blocks around by ref" 2021-10-18 16:40:36 +00:00
jenkins-bot
e330e7d839 Merge "block: Add BlockManager::getIPBlock()" 2021-10-18 16:40:30 +00:00
Amir E. Aharoni
d7c1b8999e Add the Farefare language (gur) to Names.php
Bug: T293656
Change-Id: I4c6f0af1ce7f8e8e54a07b2ac78c0507c9b0bb31
2021-10-18 18:28:45 +03:00
jenkins-bot
34be0ddc8c Merge "Fix return type of PageStore::newSelectQueryBuilder()" 2021-10-18 13:47:50 +00:00
Translation updater bot
b810aed1f1 Localisation updates from https://translatewiki.net.
Change-Id: I9926854c81b553cf774981d06e66c51fd91235cb
2021-10-18 14:58:58 +02:00
Reedy
47171749aa ApiQueryBacklinks: Simplify getAllowedParams returns
Change-Id: If9576513db1bf78113efee441676a6c7f8d27768
2021-10-18 13:51:56 +01:00
jenkins-bot
e7ca1c8718 Merge "Fix nullable doc for EditPage::$editRevId" 2021-10-18 12:39:00 +00:00
Nardog
feffc82251 Fix invisible DateTimeInputWidget clear button
mw.widgets.datetime.DateTimeInputWidget() uses the "clear" OOUI icon but
the "interactions" OOUI icon module wasn't declared as a dependency,
leading to an invisible clear button unless the module was loaded
elsewhere.

Bug: T283129
Change-Id: I5aef30a7b5f4f3286e3f5b459b675204b1233fea
2021-10-18 19:28:49 +09:00
Lucas Werkmeister
3393545f44 Fix return type of PageStore::newSelectQueryBuilder()
Only the PageSelectQueryBuilder subclass has the methods that are
interesting for users of this method.

Bug: T291288
Change-Id: If73748cc24d2ab2ee7999db14201d7fc19b2cd34
2021-10-18 11:56:17 +02:00
jenkins-bot
b0c29e7b40 Merge "importDump.php: handle fopen error" 2021-10-18 08:16:03 +00:00
jenkins-bot
bd57a2ee6b Merge "WikiImporter: improve error handling" 2021-10-18 08:14:07 +00:00
Gergő Tisza
d3004df478
importDump.php: handle fopen error
Bug: T293569
Change-Id: I13c05d754513f01f6a3f293d299cb9d55cc19265
2021-10-17 21:34:41 -07:00