Commit graph

14729 commits

Author SHA1 Message Date
jenkins-bot
fdaf95c524 Merge "ApiQueryImageInfo: don't show empty comments as deleted" 2021-10-26 19:59:25 +00:00
Petr Pchelko
392d2af20c ApiQueryImageInfo: don't show empty comments as deleted
Bug: T293783
Change-Id: Icddd06c7171bc1d1dba14ec7d6703e082b87836a
2021-10-26 11:36:09 -07:00
jenkins-bot
e0f7759256 Merge "Hard deprecate LinkCache::addGoodLinkObj" 2021-10-26 15:51:05 +00:00
vladshapik
1ae8e89eb5 Hard deprecate LinkCache::addGoodLinkObj
LinkCache::addGoodLinkObj was hard deprecated.
Use addGoodLinkObjFromRow() instead. PHPUnit tests
must use LinkCacheTestTrait::addGoodLinkObject().

Bug: T284955
Change-Id: I0c22be2f00e6d6d4ba6dd1511c5385cad55e8ff7
2021-10-26 18:21:32 +03:00
jenkins-bot
3327b4a1a1 Merge "Cleanup hard-deprecated code in blocks." 2021-10-26 14:41:09 +00:00
jenkins-bot
b98d8b6060 Merge "Make SlotRecordTest a unit test" 2021-10-26 14:17:50 +00:00
Petr Pchelko
25bb5b296a Cleanup hard-deprecated code in blocks.
Change-Id: I1b3f4a0f072197c6b3dc6c9a80fcb2946aeb6360
2021-10-26 06:44:05 -07:00
Petr Pchelko
164ec5cb29 UserOptions: remove deprecated hooks.
After the hooks were removed we are finally ready to stop
reading user options from primary before writing them on save.
The new save hooks only work on modified options, so options
saving code can be significantly simplified.

Change-Id: I48df616c9f35d9a0b2801ada1b7dbef0bd4ad058
2021-10-26 12:55:01 +00:00
Winston Sung
6eda8891a0 Update 台灣 to 臺灣 according to Wikipedia-zh village pump discussions
https://zh.wikipedia.org/wiki/Wikipedia:互助客栈/其他/存档/2019年2月?oldid=61018059#「台灣」「正體」?

Follow-up of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/700626

Change-Id: I6d2a128f682e71312400b97333ffbfffe9968ee7
2021-10-26 11:02:07 +00:00
jenkins-bot
9b05a56a5d Merge "resourceloader: Change User::isAnon to !User::isRegistered" 2021-10-26 09:45:37 +00:00
jenkins-bot
4cd4eec36f Merge "Reapply "Update user_touched after saving user options."" 2021-10-25 21:10:43 +00:00
Ppchelko
8ff180948c Reapply "Update user_touched after saving user options."
This reverts commit 4d19d06455.

Reason for revert: CenralAuth tests fixed

Bug: T284354
Depends-On: I9d681baeca0df4808335e7bececfd114cdad2f0e
Change-Id: I483b8f61dcfae70c5a50399391b361cf5310ae24
2021-10-25 20:28:07 +00:00
jenkins-bot
226dbef3f6 Merge "user: Add default value for all "variant" user option keys" 2021-10-25 20:07:36 +00:00
Umherirrender
1b334a48e9 user: Add default value for all "variant" user option keys
Without a default the preference is treat as unknown and possible values
identical to the default are not excluded from javascript code or
database.

Bug: T291748
Change-Id: I37cf1cd87a5ef1fd91aba0c3cc4b0e3f9c9c08b4
2021-10-25 19:45:59 +00:00
Tks4Fish
76e3701d6a OutputPage: Remove $wgLoggedOutMaxAge experiment and related tests
Bug: T293848
Change-Id: I5e5e52fac7fe389b36715dae11cc30cdb2b9136a
2021-10-25 19:33:32 +00:00
jenkins-bot
98fbea6293 Merge "Fix PHP warning with some inputs to wfCgiToArray()" 2021-10-25 18:58:01 +00:00
Alexander Vorwerk
4d19d06455 Revert: "Update user_touched after saving user options."
This reverts commit 98878c08ba.

reason for revert: had some weird and unwanted side effects

Bug: T294265
Change-Id: I53c2175498af5b37096505dae011e65cebf029aa
2021-10-25 16:33:10 +00:00
jenkins-bot
a4b5426e4c Merge "Type-hint LinkTarget" 2021-10-25 14:53:17 +00:00
jenkins-bot
2bd3e49169 Merge "Update user_touched after saving user options." 2021-10-25 14:48:26 +00:00
Matěj Suchánek
b411cbfdaa Split PageArchiveTest
Create ArchivedRevisionLookupTest to test ArchivedRevisionLookup.
Expand tests a bit and add two more for ::getPreviousRevisionRecord.

Change-Id: I3e176b24a13479464b7e73d062639ecb4db86f8f
2021-10-25 10:41:33 +02:00
Umherirrender
7ce7e0d4aa resourceloader: Change User::isAnon to !User::isRegistered
User::isRegistered is part of the UserIdentity interface,
which makes moving from heavy User class to UserIdentity easier.

Change-Id: If44bfd398694c509272b3f89c93473b2e3c05759
2021-10-24 10:00:51 +00:00
jenkins-bot
743dc72f25 Merge "Hide deprecation on tests for ParserOutput::addWarning" 2021-10-22 21:53:17 +00:00
Alexander Vorwerk
bd13a42535 build: Update mediawiki-codesniffer from v37.0.0 to v38.0.0
Change-Id: Iff096d3789b8c261aa47fb41d6f450a3bda7ce6a
2021-10-22 22:43:16 +02:00
Bartosz Dziewoński
2254eba8aa Fix PHP warning with some inputs to wfCgiToArray()
Also add some more tests for it.

Bug: T294017
Change-Id: I8a4faa42c2219ce415fbb82a248b07a28b59157d
2021-10-21 20:49:34 +02:00
Matěj Suchánek
61289e0290 Deprecate replaced PageArchive methods
Change-Id: I07fe12e6e96c6a27b66655f179c09f624180daa3
2021-10-21 18:28:03 +02:00
jenkins-bot
0ce8ac7f7e Merge "tests: Call parent tearDown at end of teardown in BackupDumperPageTest" 2021-10-21 00:28:48 +00:00
Petr Pchelko
cee52db33d Type-hint LinkTarget
These type-hints are definitely correct, but it's still
a relatively risky patch cause of how messy Title is.
I did some manual review of Title, all tests are passing,
but even still if this is approved, I'll add it to phab
as a risky deployment.

Change-Id: I1ed98ddae30066956e7adbde6780d6bab54dec04
2021-10-21 00:12:51 +00:00
jenkins-bot
40d14fee7d Merge "Change return format of DeletePage entrypoints" 2021-10-20 22:18:33 +00:00
Umherirrender
bac7f31b0e tests: Call parent tearDown at end of teardown in BackupDumperPageTest
Reverse order to setUp, where parent is called first

Change-Id: Ia04952b9dc3bc2c7426b66f556defacb5750240c
2021-10-20 23:20:12 +02:00
Umherirrender
b581e6d40e Hide deprecation on tests for ParserOutput::addWarning
Change-Id: Ifc5f3ef93720a944f0e0fffc1666047b46f1683b
2021-10-20 21:32:49 +02:00
Daimona Eaytoy
965f6db3c1 Change return format of DeletePage entrypoints
Instead of putting logID/false in the status' value, add getters that
can be used to retrieve this information. Also, make it return an array
of log IDs, which is easier to expand later on to account for deletion
of related pages (e.g. associated talk page).

Note: this change will be backported to 1.37.

Bug: T288758
Change-Id: I7ef64242ae0cb7018a4b1e8eb004a5563925b9a4
2021-10-20 19:26:12 +00:00
jenkins-bot
91a9e2db75 Merge "Move methods from PageArchive to new ArchivedRevisionLookup" 2021-10-20 18:47:42 +00:00
jenkins-bot
c61a9dfd5c Merge "Do not cache private wiki completion results" 2021-10-20 18:47:36 +00:00
jenkins-bot
24373dab6b Merge "Replace Content::getParserOutput call to ContentRenderer::getParserOutput" 2021-10-20 17:56:19 +00:00
Roman Stolar
fa5237eb48 Replace Content::getParserOutput call to ContentRenderer::getParserOutput
Bug: T287158
Change-Id: I8a13f45027e08e2d8ddefa140dd47a0c55094934
2021-10-20 12:11:24 +03:00
Petr Pchelko
ac935cb758 Make SlotRecordTest a unit test
Change-Id: I4f5a4bf3703fc490c6c4de45f5a7947b7726aaa1
2021-10-19 20:31:55 -07:00
jenkins-bot
c55307829c Merge "Use correct default value when calling Status::getWikiText" 2021-10-20 02:36:11 +00:00
jenkins-bot
ca32b46557 Merge "mediawiki.Title: Regenerate phpCharMappings against plain PHP 7.2" 2021-10-19 21:23:40 +00:00
Petr Pchelko
c7a1e792d0 mediawiki.Title: Regenerate phpCharMappings against plain PHP 7.2
After the unicode migration from HHVM-like to PHP 7.2 (T219279),
MediaWiki is running in production with default PHP 7.2 unicode, so
some of the char mappings overrides for mw.Title are no longer
nesessary, since PHP is now closer to JS.

Bug: T219279
Change-Id: Ic487c55b09ff81c1b7878651342d793982814a3e
2021-10-19 20:59:54 +00:00
jenkins-bot
3c697fd5ee Merge "api: Inject services into ApiQuery class" 2021-10-19 20:16:07 +00:00
Petr Pchelko
2ae3e55f64 Remove Title dependency from RenderedRevision
Change-Id: I8da86277e0c8406a49ebd86faddf3dc2abbf5328
2021-10-19 07:53:26 -07:00
Petr Pchelko
66e58d1ea7 wfParseUrl: rely on parse_url for proto-relative urls
On July 12 2011 in df2306b97 Roan added this workaround
for parse_url lacking support for protocol-relative URLs.

In 2012 PHP 5.4.7 came out, that added support for
protocol-relative URLs to parse_url, see [1].

It's 2021, and after a decade of honorably serving our
community, this workaround can be now be retired.

It's not a simple deletion since we have custom 'delimiter'
bit that wfParseUrl returns, and we need to keep supporting
that.

[1] https://bugs.php.net/bug.php?id=62844
Change-Id: If9b3bb2a51afa7af1ba8e674eadaa8db4f6f33f9
2021-10-18 20:30:29 -07:00
drynok
9b202c52f4 Change WatchedItemStore to cache an array instead of MapCacheLRU
Updated the closure in WatchedItemStore::resetNotificationTimestamp() to return
an array obtained from MapCacheLRU->toArray(), instead of an object.
Updated the two places that fetch from the cache to read cache entries in either format,
for backwards compatibility.

Added testResetNotificationTimestamp_stashItemTypeCheck test to
WatchedItemStoreUnitTest which verifies correct behaviour with
cache values supplied by the test case.

Bug: T282105
Change-Id: Ibfe4c205ffdf7af7087f6f862004b95b29bdc394
2021-10-18 13:00:03 -07:00
jenkins-bot
6fd447783a Merge "Make PageEditStash::checkCache() accept an UserIdentity" 2021-10-18 19:20:11 +00:00
jenkins-bot
d2917abef6 Merge "Always encode spaces in cookie values as "%20"" 2021-10-18 00:02:27 +00:00
Umherirrender
66d4e6a3d0 Use correct default value when calling Status::getWikiText
Both parameter have a default of false, not null.

Change-Id: I5754895347db244eee155f8cf5965df5f4fd2d1a
2021-10-16 22:35:01 +02:00
Fomafix
4f71fcdfcc Remove the executable flag from test files
chmod a-x tests/phpunit/data/MSCompoundFileReader/*

Change-Id: Ic2fa5f118b40126bea429d2299563c03fe6b3d1a
2021-10-16 11:23:02 +00:00
jenkins-bot
93821348aa Merge "Allow using a reverse proxy for local HTTP requests" 2021-10-16 04:41:08 +00:00
Alexander Vorwerk
5aa1bf33f6 Make PageEditStash::checkCache() accept an UserIdentity
This allows using the already into PageEditStash injected UserFactory
instead of falling back to global state in DerivedPageDataUpdater.

Change-Id: I18f198d323c3ca001c6a0de91bc669180cd1d11c
2021-10-16 00:16:20 +02:00
C. Scott Ananian
4834340ec0 Deprecate ParserOutput::addWarning() in favor of ::addWarningMsg()
Encourage localization and factor out common code by taking a message
key as the first argument to ::addWarningMsg() instead of a wikitext
string.  This also plays nicer with Parsoid by separating out the
localization code from the parse.

Bug: T293515
Change-Id: I6a7c04c67ac586ab00d4edcbb3d09485a7794e23
2021-10-15 16:06:13 -04:00