Commit graph

104425 commits

Author SHA1 Message Date
Fomafix
356f1b72ef Use IEC prefixes instead of SI prefixes for byte sizes (docs+backend)
This change doesn't change any UI messages.

Bug: T54687
Change-Id: Ia62899a2a6fe8910618c35cd667291e397ddb055
2021-06-28 11:59:09 +01:00
jenkins-bot
f4427639d3 Merge "Let ApiSandbox display non-JSON responses like Xdebug errors" 2021-06-28 10:33:43 +00:00
jenkins-bot
7ee5162692 Merge "Change color of "You have a new message" to align with the WikimediaUI" 2021-06-28 10:31:35 +00:00
Translation updater bot
297c1bfb95 Localisation updates from https://translatewiki.net.
Change-Id: I2df2920e9a7b60beb047dac2d6695325fdac4ebe
2021-06-28 09:12:17 +02:00
Alexander Vorwerk
87500874e2 ApiHelp: inject SkinFactory
Bug: T259960
Change-Id: I816f13fdd5ab21ca4e98d69fe76960b147374f68
2021-06-27 01:03:47 +02:00
jenkins-bot
2739509d38 Merge "Optionally split out parts of file metadata to BlobStore" 2021-06-26 20:32:04 +00:00
jenkins-bot
ea5b2c95b8 Merge "ApiFileRevert: inject RepoGroup" 2021-06-26 18:08:26 +00:00
Alexander Vorwerk
54caa64986 ApiFileRevert: inject RepoGroup
Bug: T259960
Change-Id: I914fcb36b9f5e9199774d9d950c78637e2b46b5c
2021-06-26 16:51:01 +02:00
jenkins-bot
3205f2e89b Merge "Preserve parameters during navigation on Special:PagesWithProp" 2021-06-26 14:10:30 +00:00
jenkins-bot
3caa720882 Merge "mediawiki.String: Make method codePointAt public as charAt" 2021-06-26 14:00:09 +00:00
Fomafix
7ebcea3d2e mediawiki.String: Make method codePointAt public as charAt
This change renames the existing method `codePointAt` to `charAt` and
make it public. This method is similar to `String.prototype.charAt()`
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt
but supports Unicode characters outside of the BMP.
The name `codePointAt` would be irritating because the method
`String.prototype.codePointAt()`
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt
returns the code point number of the character instead of the character
as string.

Use this method to fix in the module 'mediawiki.jqueryMsg' the
functions `int`, `ucfirst` and `lcfirst` for strings with a character
outside of the Unicode BMP as first character.

Also add tests and use the usual Unicode syntax in the tests.

Bug: T285174
Change-Id: I4343e628e846de44cfdf0405261fa1a8d7ffbed3
2021-06-26 12:57:14 +00:00
Matěj Suchánek
dae38d6696 Preserve parameters during navigation on Special:PagesWithProp
There is a namespace filter and two more options on the page.
They weren't preserved when the user navigated to another batch
of results (e.g., using "50 next").

Change-Id: I702c08957daa204f151db0d85063da9818835866
2021-06-26 14:28:02 +02:00
jenkins-bot
04b14657be Merge "Adjust the description of EditFilterMergedContent hook" 2021-06-26 11:52:17 +00:00
jenkins-bot
1198ec3c5a Merge "Copy changes from legacyMediaParserTests to mediaParserTests after syncing" 2021-06-25 16:14:37 +00:00
jenkins-bot
7dd3583eb7 Merge "Sync up with Parsoid legacyMediaParserTests.txt" 2021-06-25 16:13:32 +00:00
jenkins-bot
3995f064c7 Merge "Sync up with Parsoid parserTests.txt" 2021-06-25 16:13:26 +00:00
jenkins-bot
c968fb400a Merge "UserEditCountUpdate: only store a single UserIdentity object" 2021-06-25 15:31:58 +00:00
Arlo Breault
ce7df5f6ea Copy changes from legacyMediaParserTests to mediaParserTests after syncing
From I41eb89f9a4caddce7f90f8c8b92b4fcb29eb4539

Change-Id: I24835feed2b17c2091729657c6c0c34f3ee31b78
2021-06-25 11:01:27 -04:00
Arlo Breault
354a366f31 Sync up with Parsoid legacyMediaParserTests.txt
This now aligns with Parsoid commit 356629d62ad930d67798c54aa8c11f45f328d030

Change-Id: I41eb89f9a4caddce7f90f8c8b92b4fcb29eb4539
2021-06-25 10:55:22 -04:00
Arlo Breault
9c854614a3 Sync up with Parsoid parserTests.txt
This now aligns with Parsoid commit 356629d62ad930d67798c54aa8c11f45f328d030

Change-Id: I5179a5f6fc4fdb221f1b4fd92fe0bfb3fa4442e5
2021-06-25 10:55:22 -04:00
jenkins-bot
7dcf840551 Merge "ApiFeedWatchlist: inject services" 2021-06-25 14:47:47 +00:00
jenkins-bot
313afcbd2d Merge "Make CentralIdLookup a service" 2021-06-25 13:04:05 +00:00
Alexander Vorwerk
f6797784e1 ApiFeedWatchlist: inject services
Bug: T259960
Change-Id: Iff5f37527ac2e18641cb9170c6005ed5e5265146
2021-06-25 14:33:07 +02:00
jenkins-bot
c61a081f83 Merge "Make "A database query error has occurred" message link to documentation" 2021-06-25 12:23:47 +00:00
jenkins-bot
6018933ded Merge "Remove hard-deprecated methods from RevisionStore" 2021-06-25 10:48:37 +00:00
jenkins-bot
63518e4faa Merge "Remove the AugmentPageProps class, unused" 2021-06-25 07:06:55 +00:00
jenkins-bot
d5aa75d472 Merge "Remove dependency on pimple external library" 2021-06-25 01:03:45 +00:00
jenkins-bot
cbf6dfe80a Merge "Emit media structure as piloted in Parsoid" 2021-06-25 00:14:11 +00:00
Arlo Breault
fdd8f864b8 Emit media structure as piloted in Parsoid
Gated behind the flag $wgParserEnableLegacyMediaDOM.  The scattershot
usage of it is a little unfortunate but isn't expected to live very long
so maybe that's acceptable.

Further details can be found at,
https://www.mediawiki.org/wiki/Parsing/Media_structure

Bug: T51097
Bug: T266148
Bug: T271129
Change-Id: I978187f9f6e9e0a105521ab3e26821e36a96b911
2021-06-24 23:32:40 +00:00
jenkins-bot
de58d92df3 Merge "Factor out LoggedUpdateMaintenance::setForce()" 2021-06-24 22:22:57 +00:00
jenkins-bot
7e861eeb10 Merge "UploadFromUrl: Remove use of $wgUser in isValidRequest" 2021-06-24 20:40:29 +00:00
jenkins-bot
e95615ab26 Merge "purgeParserCache.php: Implement --tag for purging one server only" 2021-06-24 20:33:51 +00:00
jenkins-bot
c93be24da9 Merge "Make LinkCache behavior more consistent" 2021-06-24 20:10:50 +00:00
Petr Pchelko
d6b3cd1a12 Remove hard-deprecated methods from RevisionStore
Bug: T274209
Change-Id: I1cdc9f2d4445cd5a32d90e9bbbfe16c65f1167ff
2021-06-24 12:42:49 -07:00
jenkins-bot
f3ecfead48 Merge "Add <figure> to the never suppressing group in BlockLevelPass" 2021-06-24 19:37:41 +00:00
Arlo Breault
5438048386 Add <figure> to the never suppressing group in BlockLevelPass
This matches Parsoid and shouldn't be an issue since nothing in core is
generating <figure>s yet, presumably.

Bug: T51097
Change-Id: I9f489b13d5d4db0415a3f0f0dbb936c8e89461fa
2021-06-24 15:07:04 -04:00
Timo Tijhof
0545fdc3af purgeParserCache.php: Implement --tag for purging one server only
Large wiki farms may have to purge servers concurrently (instead of
one at a time) in order to keep up with new writes and delete expired
rows faster than new rows are written.

The parameter for this uses server tags for three reasons:

* Maintenance risk and complexity.
  This requires the least information about MW configuration to be
  hardcoded in the scheduled maintenance cronjob (compared to: server
  indexes which are a runtime concept, or specific hostnames/IP/
  tableprefixes which may change and should not require
  coordinating changes elsewhere).

* Operational convenience.
  By using server tags, the parameters don't have to vary between
  data centers.

* Code complexity.
  The current code for obtaining connections is based on server indexes,
  which are easy to mapped at runtime from server tags. Other ways
  of identifying shard like hostnames are either an awkward fit (as
  they don't uniquely identify a shard per-se, with multiple instances
  on the same hardware at WMF), or require SqlBagOStuff to store and
  maintain more information about connections than it currently has
  readily available.

Bug: T282761
Change-Id: I618bc1e8ca3008a4dd54778ac24aa5948f27c52e
2021-06-24 18:01:27 +01:00
daniel
9e49260fc9 Make LinkCache behavior more consistent
This patch does several things to LinkCache to make its behavior more
consistent and predictable:

* Methods that set a "good" link now clear the "bad link" flag, and vice
  versa.

* invalidateTitle() now also clears the local cache, not just the
  persistent cache.

* Attempts to set data for LinkTargets that are not proper local pages
  are ignored.

* All methods now accept LinkTarget|PageRecord as the key.
  The ones that previously accepted a string still allow that as well.

* addLinkObject() now consistently uses the local cache if possible,
  and consistently bypasses it if the forUpdate() flag is set.

This is all done in preparation for LinkCache being used inside PageStore.

Bug: T278940
Change-Id: I62107789fa185606a81be20ffa8f0be48297c08f
2021-06-24 18:25:55 +02:00
Sam Smith
3bcf989f72 hooks: Remove deprecated SkinTemplateBuildNavUrlsNav_urlsAfterPermalink hook
The SkinTemplatePreventOtherActiveTabs hook was marked as deprecated in
MediaWiki 1.35.

Bug: T284950
Change-Id: I9a4806047f8d31d59a00e02145906672b85c004c
2021-06-24 17:25:46 +01:00
Sam Smith
a11aceb214 hooks: Remove deprecated SkinTemplateTabAction hook
The SkinTemplateTabAction hook was marked as deprecated in MediaWiki
1.35.

Further, there are no SkinTemplatePreventOtherActiveTabs hook handers in
codebases that we index [0].

[0] https://codesearch.wmcloud.org/search/?q=SkinTemplateTabAction

Bug: T284950
Change-Id: I998bf8ffe6be43ad3eb38b1a9388a35aa94d7685
2021-06-24 17:25:15 +01:00
Sam Smith
99786a9492 hooks: Remove deprecated SkinTemplatePreventOtherActiveTabs hook
The SkinTemplatePreventOtherActiveTabs hook was marked as deprecated in
MediaWiki 1.35.

Further, there are no SkinTemplatePreventOtherActiveTabs hook handers in
codebases that we index [0].

[0] https://codesearch.wmcloud.org/search/?q=SkinTemplatePreventOtherActiveTabs

Bug: T284950
Change-Id: I37c5bdcc8875a23798f641161e53be3e4d073d7d
2021-06-24 17:24:39 +01:00
Petr Pchelko
ae3d709b22 Make CentralIdLookup a service
This commit is a combination of work done by Tgr in
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/571411
and MaxSem in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/594533
It was just easier to create a brand new patch then
rebase old ones.

Bug: T265767
Change-Id: I3930dab70846e95154d9089905c446e721ef4ee7
2021-06-24 08:37:55 -07:00
Petr Pchelko
b30cb61b91 ApiTestCase: For tokenType=auto respect no token possibility
Change-Id: I92ae8455b08b90c613a54d63b992d59efef2c6dc
2021-06-24 14:52:04 +00:00
DannyS712
5ca02c77b2 UserEditCountUpdate: only store a single UserIdentity object
No longer need to save more than one, which was previously
needed to be able to call User::setEditCountInternal(), but
that method has been removed.

It turns out we can't just rely on the user id alone, because
UserEditTracker requires a UserIdentity object and the name
of the user matters.

Follow-up:  Ie3fb4887d9f2d96b32598865030351bf3bf20ce5
Change-Id: I4ba1300837cf2cf624c563d4445a2a7dc6b88d86
2021-06-24 11:28:52 +00:00
jenkins-bot
1f66af055d Merge "SpecialChangeEmail: Requiring email confirmation is not an error" 2021-06-24 09:37:38 +00:00
DannyS712
4b2bb69b99 Remove dependency on pimple external library
Dependency was added in T254053 so that we
could use a pimple ServiceLocator in
MediaWikiTestCaseTrait::createSimpleObjectFactory.
But, since the ServiceLocator being created is using
an empty container, its not actually used for anything,
and can easily be replaced with a mock that says
it has no services and throws if trying to retrieve any.

Per the PSR11 spec, the container interface should
throw an exception that implements
NotFoundExceptionInterface - use the
NoSuchServiceException from the Services library
that we use for MediaWikiServices

Change-Id: I721e7417036a8b0fa9084e9d13329262253ae0f6
2021-06-24 07:18:23 +00:00
DannyS712
7523df7d1f Remove the AugmentPageProps class, unused
Added to the release notes as a breaking change,
no deprecation period because there are no known
uses anywhere on codesearch

Bug: T248215
Change-Id: If7368ffdd09ab69f7a40501ef9d8a90660db7f58
2021-06-24 07:01:58 +00:00
Tim Starling
855593d203 Factor out LoggedUpdateMaintenance::setForce()
It's logically part of LoggedUpdateMaintenance. There are two copies
already, and I was considering adding a third.

Change-Id: Ib3686cb3d408a017cd17cde624df71edb379f07e
2021-06-24 16:21:53 +10:00
Translation updater bot
cbe5ed8a28 Localisation updates from https://translatewiki.net.
Change-Id: I0f41becda5ad4f3708a6cc1343970a3c9487ab85
2021-06-24 08:17:22 +02:00
jenkins-bot
69ef3bff23 Merge "In UserOptionsManager::saveOptions(), don't update unchanged rows" 2021-06-24 03:55:21 +00:00