Commit graph

8060 commits

Author SHA1 Message Date
Reedy
76249a28d2 Validate max length of bp_restrictions and bp_grants
Bug: T260631
Bug: T260633
Change-Id: Ifc35e01c711f1394f45748f693e7a46695b2d471
2020-12-05 02:10:01 +00:00
jenkins-bot
e2c4b32c58 Merge "Make ParserCache respect ParserOptions::isSafeToCache" 2020-12-02 20:31:58 +00:00
Petr Pchelko
4417b13d58 Make ParserCache respect ParserOptions::isSafeToCache
Bug: T269154
Change-Id: I8e9ecd2787aa8d172e708ba64ea936e63fbc6b36
2020-12-02 14:02:36 -06:00
jenkins-bot
8431b39335 Merge "Flip $wgParserCacheUseJson default" 2020-12-02 19:45:00 +00:00
jenkins-bot
0f55a111b4 Merge "Inject WikiPageFactory into SpecialMyLanguage" 2020-12-01 16:04:01 +00:00
jenkins-bot
33737fb7f6 Merge "Use the old HookContainer to set up the post-reset services" 2020-12-01 10:23:10 +00:00
Tim Starling
c8f51d1fb7 Use the old HookContainer to set up the post-reset services
HookContainer::salvage() expects to be called immediately after the
object is constructed, and I enforced this expectation by asserting that
$this->handlersByName is empty.

However, MediaWikiServices::resetGlobalInstance() calls
HookContainer::run() in between construction and salvage(). The effect
is that the assertion is hit if any hooks were executed using the old
HookContainer.

So, call onMediaWikiServices() using the old pre-reset HookContainer,
instead of using a partially-constructed HookContainer for this purpose.
Pass the new MediaWikiServices instance as the argument, since that is
the thing that the hook is configuring.

Bug: T263925
Change-Id: I2b462d82c82314b11563a5ba1f02c6fb6d29e608
2020-12-01 13:04:12 +11:00
Petr Pchelko
d45b16eeed Flip $wgParserCacheUseJson default
Bug: T263579
Change-Id: I56d43ac67f916c31db5a5d70e6be3e2484bc9b90
2020-11-30 15:11:08 -06:00
daniel
2c7ba6f62b PoolWorkArticleViewOld: use WANObjectCache
Use WANObjectCache instead of the local cluster object cache.

Bug: T268278
Change-Id: Ic16feffecaf4b75c284c6ef34de42ac113e625f8
2020-11-30 16:38:56 +00:00
Reedy
deb55049ae CollationTest: Stop checking for intl being loaded
Bug: T267669
Change-Id: I4ee41ebe09eac7864bb5b64d36ad6efb7f990b3b
2020-11-29 00:22:40 +00:00
jenkins-bot
bc0633d41c Merge "Check for Title::canHaveTalkPage in User::addWatch" 2020-11-28 07:49:38 +00:00
jenkins-bot
970cf8fc15 Merge "Implement FauxRequest::getPostValues()" 2020-11-28 00:19:56 +00:00
Lucas Werkmeister
5639786d3e Implement FauxRequest::getPostValues()
Change-Id: I709834c82f06e1da00df7667bd8bcc72a3d263a4
2020-11-27 09:38:08 +01:00
jenkins-bot
4641b20bdb Merge "Chain MutableRevisionRecord method calls 2" 2020-11-27 08:36:31 +00:00
Ammar Abdulhamid
71571191d4 Chain MutableRevisionRecord method calls 2
Change-Id: I86578cfbc892f171a4e433283b86d1b78fe4167d
2020-11-27 05:26:54 +01:00
jenkins-bot
7fe85a6781 Merge "tests: Fix method signature mismatches" 2020-11-26 19:47:48 +00:00
Máté Szabó
aa847d5369 tests: Fix queryFlags parameter type in RevisionStoreDbTestBase
RevisionStoreDbTestBase is mistakenly passing an array instead of an integer as
a query flags parameter in many places, which eventually gets passed to
DBAccessObjectUtils that uses it with a bitwise operator. PHP < 8 handles this
silently, but PHP >= 8 throws "TypeError: Unsupported operand types: array &
int" here.

Bug: T248925
Change-Id: I4e29b2709fe5e6d583727d45e005b3f16a1e3f4d
2020-11-26 19:39:34 +01:00
Máté Szabó
40d50dd2fc tests: Fix method signature mismatches
These cause fatals on PHP 8.

Bug: T248925
Change-Id: Ifc8536e99f4676180d47df483e55c89e9f834c32
2020-11-26 19:02:57 +01:00
jenkins-bot
71f311facb Merge "Replace $wgDisable{Lang,Title}Conversion with LanguageConverterFactory methods" 2020-11-25 20:31:56 +00:00
jenkins-bot
e48c564a7a Merge "Inject LanguageConverterFactory into special pages" 2020-11-25 18:45:09 +00:00
C. Scott Ananian
c64e71615e Replace $wgDisable{Lang,Title}Conversion with LanguageConverterFactory methods
Replace direct access to $wgDisableLangConversion with
LanguageConverterFactory::isConversionDisabled(), and replace direct
access to $wgDisableTitleConversion with
LanguageConverterFactory::isTitleConversionDisabled().  However, most
places that check ::isTitleConversionDisabled() actually want
::isLinkConversionDisabled(), so add that too (and deprecate
isTitleConversionDisabled()).

Code search:
https://codesearch.wmcloud.org/search/?q=Disable%28Lang|Title%29Conversion&i=nope&files=&repos=

This change removes a number of spurious dependencies on the global
configuration and reduces code duplication (for example, if the logic
for disabling language conversion were ever to change).

Depends-On: I6fa8230ae97b0e34c381003548e61f9b7387d363
Change-Id: Icc4687638ff1815003dd903854efdbd904854f1e
2020-11-25 12:47:26 -05:00
Umherirrender
d5c868386e Inject LanguageConverterFactory into special pages
The function SpecialPage::getLanguageConverter does not use service
injection and it seems not useful to inject the factory into every
special page when not used on each special page or used from code
directly in the SpecialPage class.

Bug: T259960
Depends-On: I550f2db0c652193755ad4ad04cececad00be72ea
Change-Id: I11e5d67b7051c159b8d32bf056a0e24aa3b526ae
2020-11-25 18:39:57 +01:00
jenkins-bot
490e887c3c Merge "Inject services into SpecialRecentChanges/SpecialRecentChangesLinked" 2020-11-25 17:20:00 +00:00
Umherirrender
fc794afe9a Inject services into SpecialRecentChanges/SpecialRecentChangesLinked
This covers only directly used services by this special page and pager
Services used by the base class are not part of this patch set

Bug: T259960
Depends-On: I62855be191ea87bdc5157b6ab879c47815644156
Change-Id: I730ce17548fad3e35e8d8b6730eb3aafd734eac9
2020-11-25 08:53:46 -08:00
Timo Tijhof
af52ed44fd resourceloader: Fix malformed "https:/w/resources" mapping in CSSMin
Follows-up cd54c03e86, in which I forgot a call to setScheme()
in the `isServerLess` branch.

For "server-less" URLs, we mock both schema and host, but only
strip the host. This left something I did not think was allowed
in the Net_URL2 class, which is to produce a URL that has a full
protocol and scheme, no host, and then a full path.

Moreoever, not only is this allowed by the Net_URL2 class in PHP,
modern browsers Firefox and Chrome also actually support this
and interpret it as a "domain relative" (?) URL.

Bug: T268308
Change-Id: I26ed3e5e9a6922badd979bbe6f5588e319ec3ebb
2020-11-25 00:38:53 +00:00
jenkins-bot
48e2e75f29 Merge "Add ChangeTags::getTagsWithData" 2020-11-25 00:07:42 +00:00
jenkins-bot
a27e2f17c2 Merge "Inject services into SpecialWatchlist/SpecialEditWatchlist" 2020-11-24 19:16:53 +00:00
jenkins-bot
c3bc6cf768 Merge "Inject services into SpecialContributions/SpecialDeletedContributions" 2020-11-24 18:52:57 +00:00
Umherirrender
7f03231ace Inject services into SpecialContributions/SpecialDeletedContributions
This covers only directly used services by this special page and pager
Services used by the base class are not part of this patch set

Have to change another service to avoid global state

Bug: T259960
Depends-On: I07203e22f4b254df5c8cd6180d915a1537b7de30
Change-Id: Ifed2cbd2eee7166daf2e7d9bab017786247f88f6
2020-11-24 17:18:40 +00:00
jenkins-bot
3769fe943f Merge "Remove deprecated wfMemcKey() function" 2020-11-24 16:53:37 +00:00
jenkins-bot
dfd523d7c2 Merge "Deprecate the use of Skin::setupSkinUserCss to alter the internal array of styles" 2020-11-24 05:11:32 +00:00
jenkins-bot
81e449eb75 Merge "Revert "Deprecate Skin::setupSkinUserCss"" 2020-11-24 05:07:14 +00:00
Aaron Schulz
d1d952473c Remove deprecated wfMemcKey() function
Bug: T266502
Change-Id: I1e4b20cc30fa3ef4671d8b80e660b2ac3f469d80
2020-11-23 16:57:06 -08:00
jdlrobson
d11cb401d6 Deprecate the use of Skin::setupSkinUserCss to alter the internal array of styles
Check the internal array of styles to determine whether
the method was inappropriately used to alter the array of styles and
if it was, call wfDeprecatedMsg().

Change-Id: I591b03c2e19d4b8cadfe220b498ae244d332f9fb
2020-11-24 10:49:09 +11:00
Tim Starling
e9608cc17d Revert "Deprecate Skin::setupSkinUserCss"
The commit did not really hard-deprecate overriding of setupSkinUserCss() as stated in the commit message, rather it removed core calls to setupSkinUserCss(), instantly breaking the many skins that still override it. It did not actually create a deprecation period for graceful migration.

As discussed in T267080, there is presently no way to hard-deprecate the override of a method.

This reverts commit 334cfeffd6.

Bug: T257990
Change-Id: I8f669ba30affc437800890c3a875994a9f2eb3c8
2020-11-24 10:03:11 +11:00
Umherirrender
3f35092448 Inject services into SpecialWatchlist/SpecialEditWatchlist
This covers only directly used services by this special page
Services used by the base class are not part of this patch set

Bug: T259960
Change-Id: I4baff83b8c7bb5bd1f5b00369bfc3cec70c2391a
2020-11-23 21:38:55 +00:00
Umherirrender
8fccad62ff Inject services into SpecialPreferences
This covers only directly used services by this special page
Services used by the base class are not part of this patch set

Bug: T259960
Change-Id: Ia4a022719f572952dcb62953c8819feb3326eccd
2020-11-23 21:07:43 +00:00
Umherirrender
eaa5679adc Check for Title::canHaveTalkPage in User::addWatch
Also check Title::isWatchable
Same for removing from the watchlist
This avoids exceptions

Change-Id: Ibb9e6906c87ffc3a3b619be59f128d9d3ed4aaba
2020-11-22 22:43:38 +00:00
jenkins-bot
26849c6438 Merge "Inject services into SpecialLog" 2020-11-20 18:59:09 +00:00
jenkins-bot
56e6a9192a Merge "Inject services into SpecialSearch" 2020-11-20 17:41:17 +00:00
jenkins-bot
43e8d0a885 Merge "Improve documentation about object to be stdClass or specific type" 2020-11-20 15:47:38 +00:00
Umherirrender
49efbfe2fb Improve documentation about object to be stdClass or specific type
Some classes still needs exclude for the sniff

Change-Id: I9536c2ee84f6fb4c83cf862a152cf6b00344cb97
2020-11-20 14:47:56 +00:00
Petr Pchelko
b956c77d27 Merge CacheTime and ParserOutput accessedOptions properties
Change-Id: I5785596d68e8923f8bcbd182ace0b1991bd75c9a
2020-11-19 10:12:39 -07:00
Petr Pchelko
dbdc2a3cd3 Introduce JsonCodec to help with serialization/deserialization
Change-Id: I5433090ae8e2b3f2a4590cc404baf838025546ce
2020-11-19 08:32:21 -07:00
jenkins-bot
6e5c7e97b4 Merge "PoolWorkArticleView: inject logger" 2020-11-18 20:47:06 +00:00
jenkins-bot
2be635539f Merge "ParserOutputAccess: cache ouput for old revisions" 2020-11-18 19:52:10 +00:00
jenkins-bot
a4d2077424 Merge "Drop Article::getEmptyPageParserOutput" 2020-11-18 19:21:15 +00:00
daniel
195bc9715d PoolWorkArticleView: inject logger
Bug: T267832
Change-Id: I7f4763d0e812d076188bb1a4ca2c333f50dffbee
2020-11-18 17:08:37 +01:00
jenkins-bot
4fe60cc42a Merge "Hard deprecate NamespaceInfo::getRestrictionLevels" 2020-11-18 03:59:31 +00:00
jenkins-bot
5d4b38f0fc Merge "Reduce public methods of EditPage" 2020-11-18 03:58:36 +00:00