Commit graph

95923 commits

Author SHA1 Message Date
jenkins-bot
e2d7f9b490 Merge "Hard deprecate $wgParser" 2020-05-01 21:31:26 +00:00
jenkins-bot
09c182abba Merge "Update OOUI to v0.38.1" 2020-05-01 21:31:16 +00:00
Volker E
8588345dbd Update OOUI to v0.38.1
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.38.1/History.md

Bug: T208184
Bug: T244444
Bug: T246044
Bug: T248630
Depends-On: Iaf8fddc006d24e02e43f2634004a72b5948a8d2d
Change-Id: If005f4f71d043d70feab1dae6217fcf1dd2ab602
2020-05-01 14:13:24 -07:00
jenkins-bot
be5a6763b0 Merge "Fix variable clash in ExtensionProcessor::extractHooks" 2020-05-01 20:48:11 +00:00
jenkins-bot
3cfaa194ed Merge "Introduce UserOptionsManager and DefaultOptionsManager" 2020-05-01 20:22:56 +00:00
DannyS712
3eeb2e235b Update release notes: WikiPage::updateRevisionOn with Revision is deprecated
Follow up to 8a88d51536

Change-Id: Idc3566d489ea4b0eeadf4920675ac115be6472ab
2020-05-01 19:52:02 +00:00
jenkins-bot
47b3238f4b Merge "WikiPage::updateRevisionOn - replace uses, hard deprecate Revision use" 2020-05-01 19:14:28 +00:00
jenkins-bot
7a59f4fb01 Merge "Article::setOldSubtitle - reduce use of Revision objects" 2020-05-01 19:09:44 +00:00
jenkins-bot
0a3c1db83b Merge "SpecialComparePages: Remove use of Revision objects" 2020-05-01 19:08:17 +00:00
jenkins-bot
cd961546e0 Merge "FeedUtils: Remove use of Revision objects" 2020-05-01 19:07:04 +00:00
DannyS712
02e1285c1a Hard deprecate ContribsPager::tryToCreateValidRevision
Bug: T250431
Change-Id: Icffe4c407f46e068fb27b0632d93fcaac2b6cfa9
2020-05-01 18:30:56 +00:00
DannyS712
618ae61ff5 Fix variable clash in ExtensionProcessor::extractHooks
Bug: T251631
Change-Id: If4866fcf262dd7cb268d5fa49b7558bbd9394c00
2020-05-01 18:25:29 +00:00
jenkins-bot
8495a356ea Merge "MediaWikiIntegrationTestCase: Remove use of Revision objects" 2020-05-01 18:13:37 +00:00
jenkins-bot
eb8efad345 Merge "registration: Use array_merge() when merging CORE_ATTRIBS" 2020-05-01 17:59:56 +00:00
jenkins-bot
49ee413b38 Merge "Replace various uses of Revision objects" 2020-05-01 17:55:24 +00:00
jenkins-bot
b314cc9e5b Merge "namespaceDupes.php: Delete links if they still exist after UPDATE" 2020-05-01 17:44:39 +00:00
jenkins-bot
4cf6ea78bf Merge "auth: Use a 'use' statement rather than \ for class import" 2020-05-01 17:40:34 +00:00
jenkins-bot
eac6c4bdbd Merge "rdbms: don't treat lock() as a write operation" 2020-05-01 17:40:27 +00:00
jenkins-bot
6e8fd73eec Merge "registration: Rename ExtensionProcessor::storeToArray to storeToArrayRecursive" 2020-05-01 17:31:51 +00:00
Reedy
42ab144c5a auth: Use a 'use' statement rather than \ for class import
Change-Id: I89a822199bdc46181aa7cc71b7680e0824a63163
2020-05-01 17:21:45 +00:00
jenkins-bot
00b3aa92f8 Merge "tests: Refactor GlobalTest to use a data provider" 2020-05-01 17:19:58 +00:00
Reedy
4354b0d962 namespaceDupes.php: Delete links if they still exist after UPDATE
Bug: T226036
Change-Id: I4db32efdb10bb51b87e5e2116888655e7341b82d
2020-05-01 17:15:06 +00:00
Reedy
e9c7700232 registration: Use array_merge() when merging CORE_ATTRIBS
Change-Id: Iacadb4ee383c735e93d6add34f1a50e752a8dc4c
2020-05-01 17:14:09 +00:00
Reedy
4be5de1fbc registration: Rename ExtensionProcessor::storeToArray to storeToArrayRecursive
Change-Id: I1b054b16bf40cd496f3f541fa3e318bc1546127f
2020-05-01 17:13:59 +00:00
daniel
4b5984bcca rdbms: don't treat lock() as a write operation
I8ac4bc4d6 caused lock() to be counted as a write operation. Since
acquiring a lock may by design take a long time (e.g. PageEditStash),
this was causing transactions to be flagged as problematic due to the
large amount of time spent in this "write query".

Bug: T251457
Change-Id: Ic54d6c78b43a463c8f6edc6d65baa671a39ee39c
2020-05-01 16:55:25 +00:00
DannyS712
49707c59da Replace various uses of Revision objects
Each file's changes are independent of the other files and can be
reviewed separately.

Bug: T250579
Bug: T250714
Bug: T250580
Change-Id: I223dd6dfba27e560aff89be6705d91c40c550dd8
2020-05-01 14:54:28 +00:00
Max Semenik
3781f4113b tests: Refactor GlobalTest to use a data provider
Change-Id: Iba800edd9ca35650f79b933db48eb8f95bd09f04
2020-05-01 17:02:27 +03:00
DannyS712
5e9d155698 Remove extra space in Linker::revUserLink
Change-Id: Iff565360500abe1e64db10f6a781daf831a5f0a4
2020-05-01 13:36:11 +00:00
Translation updater bot
26b8956cb4 Localisation updates from https://translatewiki.net.
Change-Id: I88de7a989788a9e0cdecdaceb07fe7fd854e1030
2020-05-01 09:59:13 +02:00
DannyS712
8a88d51536 WikiPage::updateRevisionOn - replace uses, hard deprecate Revision use
See codesearch - only deployed call outside of core is in flaggedrevs,
and already passes a RevisionRecord:
https://codesearch.wmflabs.org/deployed/?q=-%3EupdateRevisionOn%5C(&i=nope&files=&repos=

Also fixed a use of Revision::newFromId in orphans.php

Bug: T249561
Bug: T249021
Change-Id: I5933a278de8645b7005c11026c87ae27c0373770
2020-05-01 04:54:37 +00:00
jenkins-bot
bb15823bbb Merge "Clean up validation order" 2020-05-01 04:14:54 +00:00
hmonroy
51063b1402 Clean up validation order
Reorder validation so that some validation is done sooner rather than
later.

Bug: T247017
Change-Id: I1aad1b2b5cfc0a15754c27282a886c47da46a3c1
2020-04-30 20:06:51 -07:00
jenkins-bot
eb4d00e460 Merge "Allow new style hook handlers to abort" 2020-05-01 01:22:37 +00:00
jenkins-bot
43562769eb Merge "Fix DeprecatedHooks and move emitDeprecatedHookWarnings to HookContainer" 2020-05-01 01:22:26 +00:00
jenkins-bot
0e3af7b3cd Merge "tests: Consistently use = new ExtensionProcessor();" 2020-04-30 23:37:59 +00:00
jenkins-bot
14fca1a6ab Merge "tests: Add ExtensionProcessorTest::$default2" 2020-04-30 23:37:53 +00:00
Reedy
440111a5b0 tests: Add ExtensionProcessorTest::$default2
Save some duplication

Also switch some uses of what is in self::$default2

Change-Id: I4e305109a20533c101286630ec316683630cd9d7
2020-04-30 23:20:54 +00:00
jenkins-bot
9f3223d463 Merge "SkinTemplate: Separate rendering from setup" 2020-04-30 23:04:08 +00:00
jenkins-bot
2e0121ea89 Merge "Follow-up I07dd6f7: Fix font size in diff" 2020-04-30 22:50:16 +00:00
Ed Sanders
7a2d1a3f57 Follow-up I07dd6f7: Fix font size in diff
In creating a new diff-editfont-* class the font-size
normalization of mw-editfont-* was not copied over.

This increases the size slightly from 14/.88 = 12.32px to 13px.

Bug: T250393
Change-Id: Idd9164e2c5a327b8a23f09117d08227c7f07a261
2020-04-30 23:32:02 +01:00
C. Scott Ananian
7f1ad7d984 Work around change in SimpleXMLElement behavior introduced in PHP 7.3.17
Upstream bug reports of the behavior change introduced in PHP 7.3.17 (and
applied to PHP 7.4 branch as well):
https://bugs.php.net/bug.php?id=79528
https://bugs.php.net/bug.php?id=79485

The reponsible commit in PHP was https://github.com/php/php-src/pull/5246

This was a "bug fix" in the sense that SimpleXML used to discard the
attributes on the namespace elements, which look like this:
     <namespace key="-2" case="first-letter">Media</namespace>
SimpleXML used to return this as a string "Media" instead of a
SimpleXMLElement... but ExportTest (inadvertently?) depended on that
behavior.

In any case, if we iterate over SimpleXMLElement::children() we always
get SimpleXMLElements, not "sometimes strings", and so our code will
correct correctly on PHP below 7.3.17 and above, regardless of how PHP
decides to handle this "bug".

Bug: T250568
Change-Id: I9c2cb6a86fd6e8023c1979ec6838071a87a7bcea
2020-04-30 18:27:15 -04:00
Tim Starling
3d7365e844 Allow new style hook handlers to abort
Aborting was apparently lost by accident in PS28 of the HookContainer
commit.

In the test, to allow multiple different hooks to be registered, I
used a real ObjectFactory with a fake ServiceContainer, instead of a
fake ObjectFactory. I changed the parameter to
getMockExtensionRegistry() to take the full attribute value instead of
the hook name and a single handler.

Change-Id: I7b4c547737febe81a487fe154db150055ae31344
2020-05-01 08:02:31 +10:00
Tim Starling
6091dca5a6 Fix DeprecatedHooks and move emitDeprecatedHookWarnings to HookContainer
DeprecatedHooks was not listed as a core attribute and so was not
extracted from extension.json. I added some code to extract and merge it
in extractHooks(), and I also made the "component" default to the name
of the extension which deprecates the hook, instead of "MediaWiki".

I added the core deprecated hooks based on the current Hooks::run() calls.

I moved emitDeprecatedHookWarnings() to HookContainer, and to reduce the
performance overhead, arranged for it to be called only on page views.

Change-Id: Idc0cfba782b49398d9e7feaa164fe7692d491bf9
2020-05-01 08:02:25 +10:00
jdlrobson
da527f51a7 SkinTemplate: Separate rendering from setup
The existing setupTemplateForOutput method
sets various class variables. These can be set once
inside the constructor.

A new html method is added to get the HTML string
of the skin.

This in future will allow us to update the Skin
interface to support other types of rendering
e.g. Mustache

See I7a14f74728703c50874935e9d77b35ad9434b436 for how
this would simplify Vector's codebase.

Bug: T251212
Change-Id: Iba542b035ee110fe879e2ed937cdd48c48a79a53
2020-04-30 21:17:37 +00:00
jenkins-bot
e839aaae0f Merge "Replace uses and hard deprecate Revision::getSha1" 2020-04-30 20:16:13 +00:00
jenkins-bot
d6076430d0 Merge "Have CoreParserFunctions::getCachedRevisionObject return RevisionRecord" 2020-04-30 20:16:06 +00:00
jenkins-bot
bb1ada6e17 Merge "HTMLCacheUpdateJob: Enable PURGE_URLS_LINKSUPDATE_ONLY to reduce purges" 2020-04-30 18:44:15 +00:00
Reedy
0df4a53e56 tests: Consistently use = new ExtensionProcessor();
Change-Id: I4d151339c0d8fafb5f8f1c454f340a1f73fde6d1
2020-04-30 19:39:29 +01:00
jenkins-bot
634179e107 Merge "HtmlCacheUpdater: Add getUrls() method and support selective purging" 2020-04-30 18:35:45 +00:00
jenkins-bot
501d614e8d Merge "LinksUpdate: report title when no page ID found" 2020-04-30 18:28:48 +00:00