Commit graph

108130 commits

Author SHA1 Message Date
Taavi Väänänen
d3cb44a6e7
Upgrading wikimedia/request-timeout (1.1.0 => 1.2.0)
Depends-On: I02f29397bad8334d38b6de3f7ac50187f11f98a1
Change-Id: I3deb4d9a4555019620ef9db705caa8a52f5d6d2e
2022-02-10 10:03:31 +02:00
Translation updater bot
0c4f5d589b Localisation updates from https://translatewiki.net.
Change-Id: I2298726b0c2889091bc6be7fa901b1e2d90a2e11
2022-02-10 08:18:56 +01:00
jenkins-bot
7e19c4749d Merge "Add OutputPage::disableClientCache() and deprecate ::enableClientCache(false)" 2022-02-10 07:01:21 +00:00
jenkins-bot
67a5c78758 Merge "Use $parserOutput to refer to instances of ParserOutput" 2022-02-10 06:53:51 +00:00
jenkins-bot
b21c083163 Merge "Update ParserCache serialization test cases to use a valid index policy" 2022-02-10 06:50:12 +00:00
jenkins-bot
ec6f95c6ac Merge "Add parameter type to ParserOutput::setEnableOOUI()" 2022-02-10 06:50:02 +00:00
jenkins-bot
55814d0a58 Merge "Add return types to methods in ParserOutput" 2022-02-10 06:49:20 +00:00
jenkins-bot
5e02f0ac86 Merge "Add tests for ResourceLoaderExcludeUserOptions hook" 2022-02-10 06:37:52 +00:00
Bartosz Dziewoński
41d167ff52 LogEventsList: Set context page for {{PAGENAME}} etc. in showLogExtract()
Bug: T300184
Change-Id: I6e9356a6cc3b9df9b508c3d37a0b9b75d6825efd
2022-02-10 05:34:40 +00:00
Gergő Tisza
538b524666
Add tests for ResourceLoaderExcludeUserOptions hook
Follows up I7701d094a3e905.

Bug: T251994
Change-Id: I123b159561d00d010d9fb847992864f8bb2c4372
2022-02-09 21:29:14 -08:00
jenkins-bot
5a8dc8f177 Merge "DerivedPageDataUpdater: Set ParserOutput when it's passed to it" 2022-02-10 04:39:24 +00:00
jenkins-bot
13b91c70e7 Merge "Add hook to allow extensions to prevent preferences being exported client-side" 2022-02-10 03:35:00 +00:00
jenkins-bot
4f78188336 Merge "resourceloader: Add unit test for ResourceLoaderUserOptionsModule" 2022-02-10 03:11:52 +00:00
jenkins-bot
dd5de8b4a8 Merge "Reduce WANObjectCache hits on page view" 2022-02-10 02:01:33 +00:00
jenkins-bot
1a0d3d0e5d Merge "Title: Optimize invoking newFromText() with empty string" 2022-02-10 01:03:52 +00:00
Tim Starling
a72c58e276 Reduce WANObjectCache hits on page view
When a nonexistent message is requested, a WAN cache request results,
because nonexistent keys are suppressed in the main cache by
isMainCacheable(). There is some performance degradation when such
keys are requested on every page view.

So:

* Make it so that keys prefixed with accesskey-, tooltip- and nstab-
  use Message::isDisabled() instead of Message::exists(), so that they
  can be blank instead of missing by default.
* Add blank messages for several such keys.

Change-Id: Ie70d849a8ecbf9ab70e58f582b9ba89afe9f2829
2022-02-10 11:04:54 +11:00
jenkins-bot
c6255e1545 Merge "RefreshLinksJob: assert proper title" 2022-02-09 23:13:27 +00:00
Amir Sarabadani
a965ceab7b DerivedPageDataUpdater: Set ParserOutput when it's passed to it
This fixes duplicate parsing in RefreshLinksJob

Bug: T301309
Change-Id: I3e75621a4e4fccd46836a6f9da5778aa521ca09a
2022-02-09 23:40:48 +01:00
Jon Robson
14a50dbd3b Message box headings should be block display
Upstream Minerva and MobileFrontend override.
Most message boxes don't include a heading
but when they do, inline doesn't work.

This allows us to remove rules in Minerva and MobileFrontend.

Bug: T300306
Change-Id: Ia57d98d4be39028aa2dfe4ed737755fca79c0db3
2022-02-09 22:14:17 +00:00
jenkins-bot
aab0f8f075 Merge "Modernize some warnings about account not being registered" 2022-02-09 22:02:35 +00:00
Bartosz Dziewoński
858e7af980 Modernize some warnings about account not being registered
The "error" class nowadays is only supposed to be used by Parser and
related code. It renders as red text with no special formatting.
Instead use Html::warningBox(), which renders a yellow box around the
text. (Not Html::errorBox(), because these are not really errors.)

Change-Id: I7a7046bf9b9765cbb82ec3caa1530de7f05e0da4
2022-02-09 21:25:19 +00:00
C. Scott Ananian
1f309f9aa5 Use $parserOutput to refer to instances of ParserOutput
This just helps distinguish ParserOutput and OutputPage in code search,
since they have many identically-named methods.

(See Ie4d6bbe258cc483d5693f7a27dbccb60d8f37e2c for instance.)

Change-Id: I786381c98c6d7e1f5e9d7333d6f53a282985fbbc
2022-02-09 16:23:15 -05:00
jenkins-bot
70546d6a6c Merge "Add simple configuration doc generator" 2022-02-09 20:11:34 +00:00
jenkins-bot
499f36d60f Merge "HTMLMultiSelectField: Add forced-on options to the output of filter" 2022-02-09 19:53:08 +00:00
jenkins-bot
aa9530f3cf Merge "Clean up SpecialEditTags" 2022-02-09 19:52:16 +00:00
daniel
b1e3100feb RefreshLinksJob: assert proper title
If a RefreshLinksJob is created with an improper/invalid title,
executing the job later will fail with a PageAssertionException
while trying to create a WikiPage for that title. Better check
the title when constructing the job, so the offending code is on the
stack when it happens.

Bug: T293291
Depends-On: I7dcfac0eacdd5b22bdf443e88f8e6ddb883b92cc
Change-Id: I77a622591836873415f097453da01ca7e61c41be
2022-02-09 20:39:08 +01:00
Ammarpad
7a85d17d52 Title: Optimize invoking newFromText() with empty string
Title::newFromText with empty string will always yields null.

But the decision to return null is only made after applying
various normalization and filtering routines, which will
eventually have zero effect on the return value. So we may
just return the null early as we do with null itself.

Change-Id: Ic277a6e8c8c0b2a0b6af78f6524b80574c4602af
2022-02-09 18:22:52 +00:00
jenkins-bot
563ff0dc1f Merge "TemplateParser: Only hash unique files" 2022-02-09 18:22:27 +00:00
C. Scott Ananian
b46dfcc351 Update ParserCache serialization test cases to use a valid index policy
Valid values for ParserCache::$mIndexPolicy are '', 'noindex', and 'index'.

The test cases use the bogus value 'policy1', which causes issues when
refactoring more strictly enforces validity checks on index policy
values.

Change-Id: I2d00ff4e3ded043d18942c8482a39fac14ec60bc
2022-02-09 12:47:27 -05:00
C. Scott Ananian
735670adba Add parameter type to ParserOutput::setEnableOOUI()
This is a tiny cleanup.  All the callers have been checked to pass boolean
values here.

Change-Id: I113648ea8262065dbfc0a6b61f3bc7abb2611b98
2022-02-09 12:47:05 -05:00
C. Scott Ananian
98615667f7 Add return types to methods in ParserOutput
Just added the low-hanging fruit: the methods where the return type was
obvious from local inspection.

Change-Id: If6aabfc8f0dacb156167745808fd5c57cdb3eb23
2022-02-09 12:47:05 -05:00
Petr Pchelko
ef73bfafd9 Add simple configuration doc generator
This is a first draft of the configuration doc renderer.
The resulting markdown certainly needs some love, but
we can work on improvements incrementally. This gives
us a baseline to reference on doc.wikimedia.org

Bug: T296647
Change-Id: I3c426b9fc37b1cf7ce8423969b2d7589767ee6cc
2022-02-09 07:09:32 -08:00
Alexander Vorwerk
c4649ddaee SearchHandler: skip search results which are no proper pages
Bug: T301346
Change-Id: Iaf38791bb0cb98983d8a1c8dc87a7ebdd96e4235
2022-02-09 16:06:13 +01:00
Sam Smith
f18338fadd TemplateParser: Only hash unique files
LightnCandy resolves recursively-defined partials twice, which leads to
the template file being hashed twice. While the cost of hashing the
partial the second time is minimised due to
FileContentsHasher::getFileContentsHash() caching the hash of a file in
APCu, it need not be paid.

Bug: T300210
Change-Id: Id3f62bf32c47f21181b1ec6d77a5ae9a703952b1
2022-02-09 14:12:24 +00:00
jenkins-bot
3a864377d4 Merge "composer.local.json-sample: merge */composer.json" 2022-02-09 12:59:37 +00:00
Func
3722dc30d6 HTMLMultiSelectField: Add forced-on options to the output of filter
Forced-on options (selected as default but disabled) should always in
the loaded data, like what HTMLCheckMatrix do.

Change-Id: I342928eca01ae8a9f34ee7156a515524c3a0d9dd
2022-02-09 07:32:12 +00:00
Funcer8
14b0b7c25a Clean up SpecialEditTags
Permission checks is already done in checkPermissions(), remove extra checks.

Change-Id: Ia2d70455c1bd0dc271c817c4e27851385cd39fb7
2022-02-09 15:16:29 +08:00
Translation updater bot
44e0788728 Localisation updates from https://translatewiki.net.
Change-Id: I67560b0421813794b150dac2f12e639ba2e2e7a8
2022-02-09 08:01:45 +01:00
jenkins-bot
2dbd73b526 Merge "skins: Memoize buildSidebar()" 2022-02-09 05:25:39 +00:00
Tim Starling
a516f69399 skins: Memoize buildSidebar()
Skin::buildSidebar() accounts for 3.6% of index.php CPU time in
production, and local testing shows it being called 3 times for a
useskin=minerva page view. But it is stable for override, so we can't
implement caching transparently to the caller since subclasses would not
do caching.

There is SkinMinerva::buildSidebarCached() -- without that,
buildSidebar() would have been called 4 times instead of 3.

So, add a process cache for it.

Change-Id: Iffe63c465f6039336ebbdccd88f2a55fba8883d0
2022-02-09 05:10:44 +00:00
jenkins-bot
ec5368bfcc Merge "rdbms: Move write transaction reporting to TransactionManager" 2022-02-09 04:47:29 +00:00
jenkins-bot
6c677fb5b7 Merge "rdbms: deprecate non-DBConnRef methods in ConnectionManager" 2022-02-09 04:44:08 +00:00
Amir Sarabadani
5f07ac1185 rdbms: Move write transaction reporting to TransactionManager
Bug: T299698
Change-Id: I19bd2e62bc162c17da5f99a2004f4608c423ed4b
2022-02-09 04:32:02 +00:00
Aaron Schulz
53fa385bec rdbms: deprecate non-DBConnRef methods in ConnectionManager
Bug: T193565
Change-Id: I88c3d8ce14df64d92540f466b9c9cdf9f0a393f3
2022-02-09 04:23:27 +00:00
Kosta Harlan
891cad8a1b QUnit: Set default file type to js
This silences the "Unable to determine file type from the file
extension, defaulting to js" warning shown when running `grunt qunit`.

Bug: T250045
Change-Id: Ife62c53d1e2ff6121774552c7d0793784aea6d6b
2022-02-09 04:08:42 +00:00
Kosta Harlan
588a67af05 QUnit: Allow running tests for core or single skin/extension
Usage:

* DiscussionTools tests: `grunt qunit --qunit-component=DiscussionTools`
* MediaWiki core tests only: `grunt qunit --qunit-component=MediaWiki`

It might be nice to have this more granular, to run tests for a single
file, or a single ResourceLoaderModule, but will leave that to another
time; it is already fast.

Note that some projects may fail, e.g. GrowthExperiments has a test
failure due to not mocking all of the dependencies needed for the
test code; that can be worked around by adjusting the application code
or the test registration to include all needed dependencies.

Example fixes:
* GrowthExperiments: Iea3a89a902cd17dd91696d2a37144baa9e452077
* MinervaNeue: I8f747e3df196055361d53d00fea833fb9de892f0

The only other extension I see that has one broken test when run
this way is VisualEditor.

Bug: T250045
Change-Id: I977150ece26f5878a0ccc42d39bed6c7e74e9602
2022-02-09 04:07:49 +00:00
Ed Sanders
9e234e6a37 eslint: Only apply client rules to client files
Change-Id: I757b9616ce69b6020e9f0e556e006d39de59eb01
2022-02-09 02:40:11 +00:00
jenkins-bot
44c9191838 Merge "ImagickExt: Set svg background color before importing SVG" 2022-02-09 02:39:44 +00:00
Jon Robson
fd7086a1f7 Deprecate buildContentNavigationUrls
Depends-On: Ic3011e2c9763b62a74e401b3f28e53e73a6ec7ab
Bug: T300284
Change-Id: I4cd61d4a5d1d796a74acfe641c8d4e094602b9cb
2022-02-09 01:50:09 +00:00
jenkins-bot
9da4e7da21 Merge "[changetags] Backend support for excluded tag filter" 2022-02-08 23:58:39 +00:00