Commit graph

66419 commits

Author SHA1 Message Date
Roman Stolar
a68e641f9d Move Content::getParserOutput & AbstractContent::fillParserOutput to ContentHandler
Update/Create override classes of ContentHandler.
Soft-deprecate and remove method from Content and classes that override them.

Bug: T287158
Change-Id: Idfcfbfe1a196cd69a04ca357281d08bb3d097ce2
2021-09-29 13:10:51 +03:00
jenkins-bot
3801581dae Merge "resourceloader: Preserve new 'debug' param in getScriptURLsForDebug()" 2021-09-28 15:27:27 +00:00
jenkins-bot
e7823622e4 Merge "resourceloader: Avoid repeatly calls to getter functions" 2021-09-28 15:27:21 +00:00
jenkins-bot
f566aaa829 Merge "Hard deprecate User::blockedby(), User::getblockid()" 2021-09-28 14:57:49 +00:00
Umherirrender
c62e86ceef Use @phpcs-require-sorted-array on pre-defined array in Names.php
Fix sort order for the language codes

Change-Id: Ie47160d0c638e8d9b7f125e8b37dbdfb09a3e790
2021-09-28 15:20:52 +02:00
vladshapik
12b42e8023 Hard deprecate User::blockedby(), User::getblockid()
Bug: T290869
Change-Id: If2d96705223bd80ffd68526773a2c81aaeaa898d
2021-09-28 12:50:29 +00:00
jenkins-bot
6c3b3844d5 Merge "Add Xiang Chinese to Names.php" 2021-09-28 12:24:14 +00:00
jenkins-bot
21f98f6364 Merge "Names.php: Use single quotes instead of double quotes" 2021-09-28 10:23:48 +00:00
Amir E. Aharoni
441be18a7c Add Xiang Chinese to Names.php
Also, we have well over 400 languages now, and RELEASE-NOTES
are updated accordingly.

Bug: T291899
Change-Id: I90877b5f0cde678537eed1a68e0a8fbdddb326ff
2021-09-28 10:41:20 +03:00
jenkins-bot
da5edbdbfb Merge "QueryPage: s/Sometime/Sometimes/" 2021-09-28 01:12:35 +00:00
jenkins-bot
6108f30c52 Merge "Move some methods from FileDeleteForm to a subclass of DeleteAction" 2021-09-27 22:54:42 +00:00
jenkins-bot
ee65a15c3b Merge "Allow int on ApiQueryGeneratorBase::setContinueEnumParameter" 2021-09-27 22:49:40 +00:00
jenkins-bot
39c546d706 Merge "Change 'fromdbmaster' to WikiPage::READ_LATEST" 2021-09-27 22:44:26 +00:00
Reedy
bc224d0498 QueryPage: s/Sometime/Sometimes/
Change-Id: Ibdc16044fabfe9fe3677985d10b2dbe1ac2e7c84
2021-09-27 23:43:14 +01:00
jenkins-bot
7833853b49 Merge "Remove the deprecated IP class" 2021-09-27 22:37:13 +00:00
jenkins-bot
2a124ae15b Merge "Remove hard-deprecated methods returning User from Parser" 2021-09-27 20:16:07 +00:00
jenkins-bot
ca03262e0b Merge "Use mw.Title for capitalizing and drop wgCapitalizeUploads" 2021-09-27 19:36:36 +00:00
jenkins-bot
cc4c8a0cbb Merge "Change return format of UndeletePage::undelete()" 2021-09-27 16:26:42 +00:00
jenkins-bot
e721fdd9a3 Merge "ChangeTags: Set interface flag when parsing tag names" 2021-09-27 15:46:03 +00:00
Daimona Eaytoy
d24641a2a0 Change return format of UndeletePage::undelete()
- Make it consistently return a StatusValue, as is expected by this
  kind of methods.
- Omit the comment in the returned status, as it matches the one
that was passed as method parameter to undelete().
- Return a good status if there was nothing to undelete. Callers can
  check the status value to determine if something was deleted.

The new format will make getRevisionStatus and getFileStatus
unnecessary, and will also make it impossible to distinguish between
file-related and revision-related errors. I don't think this is really
important (only SpecialUndelete uses the respective methods).

PageArchive is responsible for maintaining backwards compatibility with
the old format.

Bug: T290021
Change-Id: I51179fa7707b5fc44d2257cc927edc0bd798a4d9
2021-09-27 15:41:45 +00:00
jenkins-bot
eaf10f600b Merge "Expand local URLs to absolute URLs in ParserOutput" 2021-09-27 14:48:02 +00:00
jenkins-bot
07f3f8053b Merge "UndeletePage cleanup, part 1" 2021-09-27 14:24:53 +00:00
jenkins-bot
5c570f46da Merge "Move code from PageArchive to a new UndeletePage command" 2021-09-27 14:22:05 +00:00
Bartosz Dziewoński
e0f3c37e18 ChangeTags: Set interface flag when parsing tag names
inLanguage() clears the interface flag, so we need a second hack.

Bug: T291776
Change-Id: Ib6dbf72dd8e054024d8e3e950b7cd409531dbaac
2021-09-27 16:10:44 +02:00
Translation updater bot
33cd0740f7 Localisation updates from https://translatewiki.net.
Change-Id: I9858429c43b6dfc73da4aad9ba27e49323f37505
2021-09-27 08:20:02 +02:00
jenkins-bot
6b6042b0b8 Merge "Hard deprecate User::setOption()" 2021-09-26 21:56:54 +00:00
jenkins-bot
9eb21b43c5 Merge "permissions: Avoid null as init for PermissionManager->usersRights cache" 2021-09-26 21:54:45 +00:00
Petr Pchelko
a407ce4124 Remove hard-deprecated methods returning User from Parser
Change-Id: I4ff100136a777974f7206f599422589d51f02b88
2021-09-26 14:50:14 -07:00
jenkins-bot
49feba77f4 Merge "Ignore pages that can't exist on Special:ListRedirects" 2021-09-26 19:49:32 +00:00
Umherirrender
0e4bb6d611 Change 'fromdbmaster' to WikiPage::READ_LATEST
Constants are harder to misspell

Change-Id: Ie1afcc8580cccf815df1cc97f05a5be81676d9f7
2021-09-26 19:27:33 +00:00
jenkins-bot
86fa9b40a5 Merge "Inject UserIdentityLookup into SpecialLog" 2021-09-26 19:22:47 +00:00
Alexander Vorwerk
04dfdc3653 Hard deprecate User::setOption()
deprecated since 1.35

Bug: T277818
Change-Id: Ic251d624e5d6fa857aa92f9c5dd3df44714ac610
2021-09-26 17:18:54 +02:00
Alexander Vorwerk
4cf2895914 Remove the deprecated IP class
Bug: T291008
Change-Id: I83a0ad6543384be71fa8d057932f8331cc0fdc4f
2021-09-26 13:58:28 +02:00
Umherirrender
de20173228 Allow int on ApiQueryGeneratorBase::setContinueEnumParameter
The parent setContinueEnumParameter already does

Change-Id: If6ed51bc284e124d903d175cd0f7c7f680a11a07
2021-09-26 13:51:49 +02:00
jenkins-bot
adee073758 Merge "Inject UserFactory into special pages" 2021-09-26 04:54:00 +00:00
Alexander Vorwerk
9a7637e9e3 Soft deprecate PageProps::getInstance()
PageProps has been converted into a service with dependency injection.
PageProps::getInstance() relies on global state and thus should be
avoided.

Bug: T289544
Change-Id: Iab3e94059cb6d2d11950ae870a1713f4b3a738fb
2021-09-26 00:22:26 +00:00
Umherirrender
0d390c46c9 resourceloader: Avoid repeatly calls to getter functions
Use local variable instead

Change-Id: If90f510558a138b2294a57c7bbb9dc53ea355f9c
2021-09-26 01:55:13 +02:00
Timo Tijhof
6d14529c69 resourceloader: Preserve new 'debug' param in getScriptURLsForDebug()
Follows-up Ieaf04e0c289646dd5 which changed internal references to
bool(true) for 'debug' to the integer DEBUG_ constants, and introduced
a new debug=2 parameter.

In the refactor, I missed the setDebug() calls for
DerivativeResourceLoaderContext, which were still passing a boolean,
but more importantly were effectively passing debug=1 even if the
pageview carried debug=2. This isn't a problem yet in production since
debug=2 is currently identical in behaviour to debug=1.

The impact of this issue is mainly noticed through secondary CSS
requests. The URLs for primary stylesheets, and JS modules was already
forwarding the current "debug" version.

Test Plan:
* Open Main_Page?action=edit&debug=2
* Before this patch, e.g. on mediawiki.org today, secondary
  stylesheet requests (part of a JS module) have debug=1.
  For example "modules=jquery.makeCollapsible.styles&only=styles".
* After this, everything has debug=2 when the page view has debug=2.

Bug: T85805
Change-Id: Ia8fba4e30397bc5890033f13417b6739b0f83c38
2021-09-25 20:06:42 +00:00
DannyS712
8855258db8 resourceloader: Remove wgCommentByteLimit from mw.config
Always null, and no longer used. It was deprecated in favour of
wgCommentCodePointLimit which should be used instead.

Originally added in 2018 for T185948 as 255 or null, depending on
$wgCommentTableSchemaMigrationStage. In 2019, (I1479c73774e, T166733),
the comment migration was removed and the variable became always null,
and in change I876b02f45fc all remaining uses were removed in favour
of wgCommentCodePointLimit.

Bug: T291730
Bug: T227047
Change-Id: I0d48985026c96b9a5734a6409c88dc9cd6b2ae8a
2021-09-25 20:05:02 +00:00
jenkins-bot
a6e125c109 Merge "Chinese Conversion Table Update 2021-2" 2021-09-25 18:11:37 +00:00
Alexander Vorwerk
0f2008bcd8 Inject UserFactory into special pages
Change-Id: I2ca5c6bdec1bbf0c64270e55d29151f75935d480
2021-09-25 19:06:57 +02:00
Alexander Vorwerk
fd094c5bb7 Inject UserIdentityLookup into SpecialLog
Change-Id: Ifc17a7ef38da60ec1534b39df1657f2394cbcb59
2021-09-25 18:36:37 +02:00
Alexander Vorwerk
d0c4c0138a Ignore pages that can't exist on Special:ListRedirects
Bug: T279840
Change-Id: I6218b2a66d85ba7af33f6fb0951a5fd1d87fcd0c
2021-09-25 14:38:12 +00:00
DannyS712
9617f177d2 ResourceLoader: remove reference to resolveIndexedDependencies()
That JavaScript function was inlined

Follow-up: I6c71ed70b3b308d7b2f67924637e23b08467035f
Change-Id: I1ae2dc01cc1755223283e3df2ab543e9c65cdc30
2021-09-25 09:12:12 +00:00
Tim Starling
65b1b6b56a Remove $wgShellLocale, always use C
$wgShellLocale was a flawed solution to the problem of locale
dependence. MediaWiki has its own concept of locale (the Language
hierarchy) and any kind of dependence on the server's libc locale is
incorrect and harmful, leading to bugs. Developers have an expectation
that functions like strtolower() will work in a certain way, and
respecting the locale set in the environment at install time violates
this expectation.

The problems with using C as a locale, which led to $wgShellLocale, are:

* escapeshellarg() will strip non-ASCII characters. This can be worked
  around by not using it. The security vulnerability it was trying to
  fix can be prevented in another way.
* Shell commands like rsvg will fail to correctly interpret UTF-8
  arguments. This is the reason for the putenv(). On Linux, this can
  be fixed by using C.UTF-8, which we didn't know at the time. On
  Windows, the problem is not relevant (there are unrelated issues
  with UTF-8 arguments).

Bug: T291234
Change-Id: Ib5ac0e7bc720dcc094303a358ee1c7bbdcfc6447
2021-09-24 17:25:01 -07:00
lens0021
8eced80e24
docs: LogFormatter: $plaintext and $irctext are booleans
It seems all references to them assume the values as booleans.
Code search: https://codesearch.wmcloud.org/deployed/?q=%5C%24this-%3E(plaintext%7Circtext)&i=nope&files=LogFormatter(test)%3F%5C.php&excludeFiles=&repos=

Change-Id: I9bde1f7b1cac0ba9c0b002fd1b57a4407a4912ce
2021-09-25 03:37:43 +09:00
jenkins-bot
47d31038eb Merge "Allow skipping $wgMaxImageArea check" 2021-09-24 17:35:49 +00:00
Petr Pchelko
ee4e19498f MovePage: don't create a recent change for a redirect
Follow-up on e33f6b4b8

Bug: T291677
Change-Id: Ibea22700f5e5d2a8a8bd5995474b45ab847d2ba4
2021-09-23 19:58:04 -07:00
Umherirrender
769bdbf091 docs: Fix nullable documentation for class properties
Change-Id: I6d0577124d852103f485ffdc819876a13f6641c3
2021-09-24 00:54:53 +00:00
jenkins-bot
e532630b11 Merge "mediawiki.util: Update addPortletLink to support 'text-wrapper' option" 2021-09-23 22:47:39 +00:00