Commit graph

101736 commits

Author SHA1 Message Date
Ed Sanders
070f94de80 Maintenance: Don't modify mOptions in getOption
This makes hasOption stable and usable even after getOption.

Also getOption can now be called twice with different defaults.

Strictly speaking this is a breaking change, but the actual
behaviour is now closer to the expected/documented behaviour.

Bug: T275619
Change-Id: I65e32a7e1bc253f4b29378be6980c42e43f93032
2021-02-25 15:42:05 +00:00
jenkins-bot
781d5c10d6 Merge "URL encode the username passed to prefs-user-downloaddata-help-message" 2021-02-24 21:19:30 +00:00
David Lynch
68faccd098 URL encode the username passed to prefs-user-downloaddata-help-message
Usernames containing certain characters would otherwise break the link
generated in the message. Message documentation already says the name is
intended for being placed in links, and so presumably can be left as-is.

Bug: T275620
Change-Id: If03b034beb5dc56a8569602e604d0345b595d054
2021-02-24 13:44:28 -06:00
jenkins-bot
cbf94bdf7f Merge "Fix and add various type hints" 2021-02-24 19:20:21 +00:00
Lucas Werkmeister
293b061f29 SpecialPageFatalTest: tolerate failure to create page
Sometimes the special page can’t be created – for example, the list of
registered pages could have changed between the data provider and the
test function, due to extensions conditionally registering their special
pages. Skip the test in this case instead of crashing.

Bug: T275661
Change-Id: I573967ac22ed3a596b4f80b76d395ac948f802e8
2021-02-24 19:28:04 +01:00
Thalia
21ab535b83 Fix filename in PageUpdater documentation
Change-Id: I7e3d238286f03b785c896a9b5db05af8c5f12fd9
2021-02-24 14:22:18 +00:00
jenkins-bot
abc8f2aa06 Merge "ApiQueryUserContributions: use UserSelectQueryBuilder" 2021-02-24 09:39:30 +00:00
jenkins-bot
c6679ecf66 Merge "Make actor services usable with object factory." 2021-02-24 09:31:19 +00:00
jenkins-bot
b21683612a Merge "Convert skin code to Authority where ready" 2021-02-24 09:15:37 +00:00
Translation updater bot
98a5f0d78c Localisation updates from https://translatewiki.net.
Change-Id: I1616a87aa6b2c97e1ef7abd53952fde476cff07a
2021-02-24 08:50:18 +01:00
jenkins-bot
274705b0aa Merge "resourceloader: Fix FileModule resource URLs for document root wikis" 2021-02-24 06:02:29 +00:00
Tim Starling
e2a91921c5 resourceloader: Fix FileModule resource URLs for document root wikis
Per the comment in extractBasePaths(), remoteBasePath is typically '/'
when MediaWiki is installed in the document root. CSSMin knows what to
do with that, but getRemotePath() was getting it wrong, generating an
invalid protocol-relative URL.

So, add a simple hack for this case.

Change-Id: I16abf482e3a1a4a548c571de0e81cb3c1bdf55e1
2021-02-24 05:27:55 +00:00
Petr Pchelko
bb990c7e94 Convert skin code to Authority where ready
Change-Id: Ie530051d7abb3137e0e79114cb01dbb129ae0fe0
2021-02-23 21:04:19 -07:00
jenkins-bot
e0db57ee24 Merge "mediawiki.less: Add transition and animation variables" 2021-02-24 02:51:43 +00:00
jenkins-bot
56ea64221a Merge "mediawiki.less: Add colors, border variables and restructure file" 2021-02-24 02:51:29 +00:00
Petr Pchelko
7f38946a62 ApiQueryUserContributions: use UserSelectQueryBuilder
There's still room for improvement - batching users by prefix
can be abstracted into the UserSelectQueryBuilder, but I'll do that
separately. It still references actor_id, but that's because
we still have to explicitly query rev_user_temp, and different
paging will mess up the continuation. After completing actor
migration I think we can order the results differently.

Change-Id: I75ff6081f8ecb9fd0dcdd7bbd8b0c974ae71101c
2021-02-24 00:11:15 +00:00
Petr Pchelko
c3bdbb8bed Make actor services usable with object factory.
Change-Id: I75dce2f1131a936d79475f6f8f3474d4bf32b760
2021-02-24 00:11:07 +00:00
Bartosz Dziewoński
f59f43b7e0 SECURITY: Escape the wikitext of parse warning messages in live preview
Bug: T274883
Change-Id: I3a57a823fac94a56ce0211e22227499c0c7b2a51
2021-02-24 00:40:47 +01:00
jenkins-bot
16ecc046fa Merge "Convert logging namespace to Authority" 2021-02-23 23:28:48 +00:00
jenkins-bot
bcba94d420 Merge "Convert AuthManager to Authority: step 1." 2021-02-23 22:33:01 +00:00
jenkins-bot
2c3aa555d5 Merge "Use Authority in special pages pagers" 2021-02-23 22:24:17 +00:00
Petr Pchelko
3a5c8f0f25 Convert logging namespace to Authority
Change-Id: Icb44acf275a7f9231c4d229b3886ed8a36d5cbd4
2021-02-23 21:58:37 +00:00
Petr Pchelko
eb4e26bc03 Use Authority in special pages pagers
Change-Id: I01eccaab42759c186649d69c104318e05e91157a
2021-02-23 14:29:10 -07:00
Dan Duvall
33138a3984 pipeline: Use /srv/mediawiki as production working directory
Change-Id: I01860e9448129658027fd4509b23426c3b88fd5c
2021-02-23 09:48:42 -08:00
jenkins-bot
998af2a6b9 Merge "Use Authority and GroupPermissionLookup in Action API" 2021-02-23 16:03:56 +00:00
daniel
74723d21cc Don't use getUserId in RevisionStore.
We are in the process of moving from getUserId() to getId() anyway. That
should resolve the issue in addWiki for now. It will however break again
in the future, when we requrie a matching wikiId in User::getId().

The real fix would be resolving T200471.

Bug: T275452
Change-Id: I9a7c383a6c31929e25899fd627131afc25584d5b
2021-02-23 16:19:35 +01:00
Cindy Cicalese
f6e1891c6f Use Authority and GroupPermissionLookup in Action API
Replaces calls directly to PermissionManager with calls to
the Authority object available from Context or the
GroupPermissionLookup service.

This patch does not address use of PermissionManager for
blocks.

Deprecations:
- ApiBase::checkUserRightsAny deprecated passing optional
User parameter
- ApiBase::checkTitleUserPermissions deprecated passing
LinkTarget as first parameter, takes PageIdentity instead

Bug: T271462
Bug: T271854
Change-Id: I5d7cac1c28a37e074750c46cda03283980a07fca
2021-02-23 14:31:14 +00:00
jenkins-bot
5bedaf11a5 Merge "Force unique ids for cloner-generated elements" 2021-02-23 14:19:08 +00:00
jenkins-bot
04626a940f Merge "Add converter for the Talysh language (tly)" 2021-02-23 12:45:31 +00:00
jenkins-bot
cfcb437c87 Merge "Use context Authority in Actions for permission checks" 2021-02-23 12:44:49 +00:00
jenkins-bot
5008ca185e Merge "UserQueryBuilder: abstraction for actor table queries." 2021-02-23 12:27:26 +00:00
jenkins-bot
e3183d907a Merge "Hide empty tables when viewing page information" 2021-02-23 10:18:24 +00:00
Amir Sarabadani
0dfae58fc5 Remove unused patch-linktables.sql
This file was never wired to update.php since its introduction in 2004
and was added to documentation as something you can run if you want to.

That documentation was removed in 2005 and since then, there is no
mention of this file anywhere and it's clearly unfit to run in current
schema.

The commit that introduces it: https://phabricator.wikimedia.org/rMW59c6e92429c
The commit that removes documentation: https://phabricator.wikimedia.org/rMW10b01d61eae280

Change-Id: Ib98f2275f9dfba0870d1638274ddf05ecf50b5b1
2021-02-23 09:38:46 +01:00
Translation updater bot
c2890c3d19 Localisation updates from https://translatewiki.net.
Change-Id: Idfc1a7e18f288c3a7c840b9464623b316cf8b471
2021-02-23 08:46:43 +01:00
Volker E
fed3cb3c97 mediawiki.less: Add transition and animation variables
Change-Id: Ib40bec99d1174a62960c2a8f7b22fc6de10c2e66
2021-02-22 16:21:08 -08:00
Volker E
957ce323a6 mediawiki.less: Add colors, border variables and restructure file
Adding variables. Applying comment structure.

Change-Id: Ieee6fdeeaa7ef31e52cdc2c841974fc4b9f7f4b2
2021-02-22 16:18:31 -08:00
jenkins-bot
03c382f199 Merge "Add all userinfo properties to user data link in user preferences" 2021-02-22 23:56:06 +00:00
Thalia
55a5bfdebe Add all userinfo properties to user data link in user preferences
Bug: T272412
Change-Id: Icb7f7216868478e01df3bd0aabb889d8e6520287
2021-02-22 23:22:00 +00:00
jenkins-bot
aa63bee71d Merge "ApiQueryUserInfo: Allow all uiprops to be requested at once" 2021-02-22 23:11:24 +00:00
Petr Pchelko
2ebb44eac4 Convert AuthManager to Authority: step 1.
Cut the explicit dependency on PermissionManager
and rely on the fact that User implements Authority.

There's still a few ends we need to cut before converting
the method parameters to Authority, but that can be done
in followup steps.

Bug: T273510
Change-Id: I69617e624f47944f8a383d0b28885678c1249f23
2021-02-22 15:40:37 -07:00
Petr Pchelko
4f0e8b038e Use context Authority in Actions for permission checks
Change-Id: I54ee99098a39bf28646d61689b8e6e5a5d7c3c68
2021-02-22 15:07:28 -07:00
Thalia
0be0162841 ApiQueryUserInfo: Allow all uiprops to be requested at once
This is useful for use cases such as T272412, which allows any user
to see all their info via their preferences.

Bug: T275441
Change-Id: I99e576bd9ad3980ee0fa8397409ef0c7e248a175
2021-02-22 21:46:42 +00:00
jenkins-bot
9cd7d35500 Merge "Add a few tests for ActorStore corner cases" 2021-02-22 20:35:24 +00:00
jenkins-bot
f319f696bb Merge "Add caching to ActorStore" 2021-02-22 20:14:28 +00:00
STran
023a7257bc Force unique ids for cloner-generated elements
Cloner elements are created using the data-template attribute in
the parent element. The first template use will result in unique
ids but subsequent uses reuse the template ids.

Use the cloner count to make each id unique whenever the cloner
generates new elements. It is safe to do so because ooui-php
is not used for any other sort of data management, only to distinguish
between unique elements. By appending onto the id, there will also
be no overlap with ooui elements generated elsewhere on the form.

Bug: T274533
Change-Id: I96bb093a83303de7d65772f9b807ed0c735005b2
2021-02-22 12:11:28 -08:00
jenkins-bot
6ca0ab0303 Merge "Implement UserIdentityValue::__toString()" 2021-02-22 19:54:29 +00:00
Petr Pchelko
87a5cb4673 UserQueryBuilder: abstraction for actor table queries.
This introduces a specialized SelectQueryBuilder for
queries related to actor table. So far it's fairly basic,
but in future it is intended to grow.

This patch only introduces the new abstraction, using
it will be separated into separate patches.

Bug: T274223
Change-Id: Ibb1c58016e3956a46bfaf1a9f51f265114bb9ace
2021-02-22 11:47:07 -07:00
jenkins-bot
f08fd3a7f0 Merge "HTMLUsersMultiselectField: Keep IP addresses while normalizing" 2021-02-22 18:29:23 +00:00
jenkins-bot
ed5e6e22a9 Merge "Escape wikitext in the title in invalid title error messages" 2021-02-22 16:36:51 +00:00
Cindy Cicalese
fd71596f97 Add caching to ActorStore
Bug: T273974
Depends-On: I8c18d86fe42056fbb676467a6657fd2f62e9c998
Change-Id: Iff5e3f07ac5b1192dd7a9f7f37589d8eae09a746
2021-02-22 09:25:13 -07:00