Commit graph

106717 commits

Author SHA1 Message Date
Tim Starling
12cac7cca9 LockManager: distinguish conflicts from other kinds of lock errors
With a user-friendly error message which uses both technical and
non-technical language, without the irrelevant detail of filebackend
URLs.

Bug: T283045
Change-Id: I8704f405d38acdffae7bd4ea5b91f3f591fc2ebc
2021-11-09 21:58:20 +00:00
jenkins-bot
2b9cabf5b3 Merge "build: Update eslint-config-wikimedia to 0.21.0" 2021-11-09 21:38:15 +00:00
jenkins-bot
4f15011bb1 Merge "resourceloader: Use UserIdentity in some cases" 2021-11-09 21:36:08 +00:00
jenkins-bot
73170eddad Merge "resourceloader: Fix null type docs for FileModule::getPackageFiles" 2021-11-09 21:36:02 +00:00
Ed Sanders
9fe2995989 build: Update eslint-config-wikimedia to 0.21.0
* Replace `substr`/`substring` with `slice`. The second argument
  to `substring` is length, not end index as in `substr`/`slice`,
  so convert where necessary.
* Replace `new Date().getTime()` with `Date.now()`
* Documentation fixes
* Replace `throw Error` with `throw new Error`

Change-Id: I532500ea4c99d8ebec01efb21273c8df21626e59
2021-11-09 21:08:55 +00:00
Umherirrender
396444940c resourceloader: Fix null type docs for FileModule::getPackageFiles
The null check for the class property packageFiles needs change to
check the return value of the function instead, because Phan would
report an issue that a null value is used in the foreach.

Phan does not understand the relation between the return value and the
class property.
When using a local variable then Phan can check
that the value is never null when used.

Change-Id: I48ac8a8fe55ae7b4e13bc94d2f2d2ede01fbc68b
2021-11-09 21:04:27 +00:00
jenkins-bot
8e1ab4f1fe Merge "Make DeleteAction and FileDeleteAction share showForm" 2021-11-09 20:52:49 +00:00
jenkins-bot
d4c2122b15 Merge "Update doctrine/dbal versions" 2021-11-09 19:27:12 +00:00
Reedy
efdf87ba5f RELEASE-NOTES-1.37: Prepare for 1.37.0-rc.2
Change-Id: I6b2a1e76b573b4a7f6fb12f405fee951703c4f70
2021-11-09 18:21:05 +00:00
vladshapik
8d2be7706d Drop User::getRights()
Deprecated since 1.34 and unused.

Bug: T277511
Change-Id: Ia798c62cdfe6ad6c6d7af8d68b95231883a071fe
2021-11-09 19:20:41 +02:00
jenkins-bot
80d3ece54a Merge "Revert "Move limit report rendering to ParserOutput"" 2021-11-09 16:29:57 +00:00
Ppchelko
2bcb3fe567 Revert "Move limit report rendering to ParserOutput"
This reverts commit 89028e0b8e.

Reason for revert: Temporary until we deal with T295357

Change-Id: I556de18dbf900a9bc58d5ae22d1bf194682d0840
2021-11-09 15:57:18 +00:00
jenkins-bot
9f6fa7839a Merge "Vue: Add propsData parameter to Vue.createMwApp()" 2021-11-09 14:29:06 +00:00
jenkins-bot
6e4f771462 Merge "ApiQuerySiteinfo: Fix "rightsinfo"/"url" when $wgRightsPage is set" 2021-11-09 13:15:25 +00:00
Translation updater bot
44b9d834cc Localisation updates from https://translatewiki.net.
Change-Id: Idc06516b2c46d6c71e1b4f9376386c3265a6295e
2021-11-09 07:12:39 +01:00
jenkins-bot
5c5c7d03eb Merge "Update margin rule for menu icons." 2021-11-09 00:10:25 +00:00
jenkins-bot
58f9dc68fc Merge "collation: Improve IcuCollation for static code analyzer" 2021-11-08 23:14:55 +00:00
jenkins-bot
0bacc6a575 Merge "test: Always use strict equalities" 2021-11-08 22:17:31 +00:00
jenkins-bot
4f7a45490b Merge "Move limit report rendering to ParserOutput" 2021-11-08 22:16:18 +00:00
Umherirrender
52631861b1 collation: Improve IcuCollation for static code analyzer
phan says that $this->mainCollator is not documented to get null
assigned.
Use a local variable to check for null and than set the class property.

Change-Id: I000c935da8d99184f2ae0382fc5caac81e80c8d7
2021-11-08 23:11:19 +01:00
Umherirrender
6fbea844cc resourceloader: Use UserIdentity in some cases
Created new ResourceLoaderContext::getUserIdentity

For anon requests no user identity is created.

Change-Id: I07084e8949a634dbb0b45e3fa51af2dbb28bdab4
2021-11-08 22:58:56 +01:00
jenkins-bot
b1a55d5b62 Merge "resourceloader: Fix nullable documentation for property and return types" 2021-11-08 21:54:06 +00:00
Clare Ming
5d41387b58 Update margin rule for menu icons.
- Add margin to adjacent sibling span of icon claass.

Bug: T292452
Change-Id: I2dbc88331c1a43441f4944cba9b0a51ad41d0025
2021-11-08 14:53:14 -07:00
jenkins-bot
5729022456 Merge "Use ParserOptions::newFromContext in MessageCache" 2021-11-08 21:45:40 +00:00
Ed Sanders
e2c4f1ef0d test: Always use strict equalities
Replace assert.(not)ok/(not)equal with strict equality checks:
assert.true/false/(not)strictEqual.

Will be enforced in upcoming eslint-config-wikimedia release.

Change-Id: I4a9523b72834524a4b4e4339d5b175a8346a646c
2021-11-08 21:41:01 +00:00
Petr Pchelko
89028e0b8e Move limit report rendering to ParserOutput
This does not move the actual limit report data into
ParserOptions yet, that should be done separately
given that it will require serialization changes.
Let's get this change settled first before messing
with serialization.

This unifies canonical and non-canonical ParserOptions,
so ParserCache can now be used with both. It is hard
to say how this will affect the ParserCache capacity,
so we should monitor it after releasing this.

Change-Id: I154c0a77a5b0287b5572614d56339fb57ac56c33
2021-11-08 12:45:41 -08:00
Reedy
53ceaca6f9 Update doctrine/dbal versions
Change-Id: I9af2b53825afc7497af4a474c2940fd7dd841e72
2021-11-08 20:30:12 +00:00
jenkins-bot
ba7ac9f655 Merge "Set ParserOutput 'injectTOC' based on Skin options for page views" 2021-11-08 18:35:48 +00:00
C. Scott Ananian
f3d7462e37 Set ParserOutput 'injectTOC' based on Skin options for page views
Clean up loose ends from the skin table of contents patch (I44045b3b9).

* Clarify $options -> $skinOptions (because there are so many different
  "options" classes!)
* Remove redundant default when Article::doOutputFromParserCache()
  calls ParserOutput::getText() -- the 'injectTOC' option defaults
  to true inside ParserOutput::getText() as well.

Bug: T287767
Followup-To: I44045b3b9e78e7ab793da3f37e3c0dbc91cd7d39
Change-Id: I04b8d8a4076df551347ec6d6599d597424a2dadf
2021-11-08 18:09:46 +00:00
Petr Pchelko
928f707731 Remove old HTTP request implementations
Since 1.34 setting non-default HTTP engine
has been deprecated. It's time to remove
the old implementations. Only Guzzle is
now available.

Change-Id: I978b75827e69db02cbc027fe0b89a028adfc6820
2021-11-08 07:04:06 -08:00
Daimona Eaytoy
6cbff5bbac Make DeleteAction and FileDeleteAction share showForm
Use getTitle() in FileDeleteAction, it's the same as using the old
$this->file.

Use a single showForm method for both classes, and a separate method to
add handy links. When switching to FormAction, the former will be
replaced by getFormFields(), the latter by postText(). However, before
doing that, the following things should be addressed:
- The onArticleConfirmDelete hook, which allows changing the reason.
  This hook should be replaced in the long term, but for now it might be
  sufficient to add it to the common UI logic and only run it for
  non-file pages.
- The horrible $hasHistory hack. This is going to be a tad more
  complicated because we need to remove it from WikiPage and
  ContentHandler, and replace it with something else.

Bug: T288282
Change-Id: I965c32457b1426ece9781221a95337d295b9e1a2
2021-11-08 13:46:57 +00:00
Amir E. Aharoni
1c009126c5 Change names of languages in Cyrillic to lowercase
None of these languages' names need a capital letter.

Change-Id: I0a54f17d4fef3166c376b80263ac1854dd5b3e37
2021-11-08 07:31:15 +00:00
Translation updater bot
012ff0a498 Localisation updates from https://translatewiki.net.
Change-Id: I56306702b05b4377587a05edf473bb3a62c53c6d
2021-11-08 08:03:06 +01:00
vladshapik
aac67c6c38 Drop User methods which were deprecated since 1.37
The following User methods, deprecated in 1.37, have been removed:
- ::resetIdByNameCache,
- ::getStubThreshold,
- ::matchEditTokenNoSuffix,
- ::changeableByGroup
- ::changeableGroups,
- ::isAllowUsertalk
ActorStore::clearCaches() has been removed, since User::resetIdByNameCache
has been removed. User::$mAllowUsertalk has been removed, since
User::isAllowUsertalk has been removed.

Bug: T277511
Change-Id: I608a5277924fc50cc3d9fca6ba958bc6d9c321d0
2021-11-06 07:24:08 -07:00
C. Scott Ananian
059e62cde6 Regression fix: do language conversion on ToC in ParserOutput::getText()
We moved the ToC insertion from the parser to ParserOutput::getText()
in T287767 but forgot to ensure that the ToC contents are properly
language converted -- this happens *after* the call to
ParserOutput::setTOCHTML() in the old Parser code.

This is a quick and dirty fix, which does the language conversion
but probably misses a few corner cases of the original behavior
(marked by XXX comment).  For example, it doesn't disable language
conversion on interface messages -- but there shouldn't be any
ToC on interface messages.  Not heeding __NOCONTENTCONVERT__
in the article is a legit problem, but probably not as bad as
the UBN regression we're fixing.  We'll clean this up in
a followup (T295209), but it will involve passing some additional
information from the Parser to ParserOutput which won't be
present in "old" parser cache entries anyway.

This is an UBN and this patch is the quickest way to ensure that
existing parser cache content renders correctly.  It's
preferable to the alternative
(Iffcff96fd9b4749794ac78414c1801979a652792) which handles all the
corner cases but can't fix up existing parser cache content,
which has "always" been stored without language conversion.

Bug: T295187
Change-Id: Ic14b3a49a8ee7ed600485d4f8a363a206035a847
2021-11-05 23:59:10 +00:00
jenkins-bot
4d20a19df0 Merge "Include name of page identity on failure within WikiPageFactory" 2021-11-05 22:00:43 +00:00
jenkins-bot
9995d77733 Merge "htmlform: Remove HTMLFormField restrictions on 'name' and 'id'" 2021-11-05 21:42:04 +00:00
Bartosz Dziewoński
2990c003e3 htmlform: Remove HTMLFormField restrictions on 'name' and 'id'
The restrictions were introduced in r53480 (724411c7ca, 2009),
which makes it clear that this was just about HTML correctness,
and in HTML5 there are fewer requirements.

This code was last touched in commit fd6e9ef2d4 (2017), where it was
suggested in code review that it "can probably be removed":
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/362326/comment/6e71af52_900abad4/

Bug: T126962
Change-Id: I54c1f28ec9112cd4a161a79e76c2224f91f134b9
2021-11-05 21:17:29 +00:00
Bartosz Dziewoński
b1b1ec343f ApiQuerySiteinfo: Fix "rightsinfo"/"url" when $wgRightsPage is set
Bug: T295191
Change-Id: I181b29dbdc8374837789c1d900577e49f62bd8d3
2021-11-05 21:56:01 +01:00
Roan Kattouw
14f9fb0249 Vue: Add propsData parameter to Vue.createMwApp()
For compatibility with the createApp() API in Vue 3.

Bug: T294476
Change-Id: I1fcdcf7bf87f5af2deb9763a231f2c360ea45b23
2021-11-05 13:17:44 -07:00
Umherirrender
85dce7fab2 Include name of page identity on failure within WikiPageFactory
Depend on PageReference::__toString for debug should be enough

Change-Id: I740c7ed0328eedaba4f66178ef7343833c87abe8
2021-11-05 20:55:19 +01:00
Umherirrender
b9a6c99032 Use WrappedString to build strings in MWDebug
This gives a small performance benefit on developer wikis when the html
page is build.

Change-Id: Ic90bde09500776ae24952d627e582fbce688e36c
2021-11-05 18:33:15 +00:00
jenkins-bot
3064816e86 Merge "Improve nullable documentation in special page class about args" 2021-11-05 17:43:36 +00:00
jenkins-bot
76c52330ba Merge "doc: Cleanup @param documentation" 2021-11-05 17:41:33 +00:00
Petr Pchelko
db5cb74486 Upgrade to Shellbox 3.0.0
Depends-On: Idfe35c788a84f04a760edb01c0bf48ddc8accb1f
Change-Id: Ib5ffeec5bb6b45ea7fb93aec8df4368231188b67
2021-11-05 08:31:26 -07:00
jenkins-bot
ffb80447cf Merge "File: remove deprecated methods" 2021-11-05 15:17:46 +00:00
jenkins-bot
b18537d30d Merge "PageUpdater: apply tags even if RC suppressed." 2021-11-05 15:17:40 +00:00
Translation updater bot
044cd72f5a Localisation updates from https://translatewiki.net.
Change-Id: I8a6ddee1606b87cfe656a003efc68bac77570ad3
2021-11-05 08:02:03 +01:00
Umherirrender
171775e07b doc: Cleanup @param documentation
No extra sign needed between variable and description

Change-Id: Iaaaf62a3ffba7967aef8c31b121121b2830b74c4
2021-11-04 22:32:39 +01:00
jenkins-bot
43fa5b2298 Merge "RELEASE-NOTES-1.37: Move comment from 20fd877 to 1.38, this missed the cut" 2021-11-04 21:29:31 +00:00