Commit graph

106571 commits

Author SHA1 Message Date
Tim Starling
82d168fa34 Fix history page iteration in backwards mode
The history page in backwards mode showed revisions in forwards
chronological order instead of reverse chronological order, due to an
error in the CommentFormatter patch. So:

* Restore $firstInList as it was prior to the CommentFormatter change
* Instead of trying to derive the result offset from $this->counter, use
  $this->getResultOffset(). I avoided this in my CommentFormatter patch
  because of the weird way HistoryPager offsets its results by one,
  ignoring the first call to formatRow(). But on closer inspection, it's
  still the easiest way to get the correct offset, you just have to store
  it alongside the fetched row.

Bug: T292791
Change-Id: I5c0822138b244402930e192a18f01b61246b95ee
2021-10-11 11:51:07 +11:00
Bartosz Dziewoński
6bba760218 Rename linter-pager-* messages to avoid conflict with Linter extension
Bug: T292098
Change-Id: I2ba4b5b61186cd2f0ba08bec0d920b33e220ed33
2021-10-10 00:02:25 +02:00
Fomafix
33720e7683 AllMessagesTablePager: Avoid double class mw-datatable
This change replaces in the HTML of Special:AllMessages
  <table class="mw-datatable mw-datatable" id="mw-allmessagestable">
by
  <table class="mw-datatable" id="mw-allmessagestable">

Remove unnecessary space at the start of the value of the class
attribute in TablePager.

Inline the one-time used variable
  $tableClass = $this->getTableClass()

Change-Id: I4353d47bda3136cd3a8341677a0288f59895d5c6
2021-10-09 16:59:10 +00:00
Reedy
2bcc75c9b4 Upgrading zordius/lightncandy (v1.2.5 => v1.2.6)
Depends-On: Ie300e47f0c1429784a9ee97d99b25e37ea83787a
Change-Id: Ic2829a2d1c6d4ba106b162416cedecd7066f2c34
2021-10-09 10:25:10 +00:00
Aaron Schulz
278bcbb7a6 Reduce microtime()/mt_rand() fragility in WANObjectCacheTest
Tweak testLockTSESlow() tests to reduce mt_rand() dependency.

Also, rename last few $now variables to $mockWallClock and use
integral floats to make it easier to find raw microtime() values
via debugging statements.

Change-Id: Ie2b125e42d3ac37104f5b87b75a9a81558956518
2021-10-09 03:16:57 +00:00
Timo Tijhof
df32228920 profiler: Remove dependency on WebRequest from Profiler
I intent to remove Profiler::getContext/setContext after a week
without deprecation. I consider these methods as internal (they
predate the stable interface policy, and we forgot to triage this
class, it has neither `@stable` nor `@internal`).

The hard-deprecation in this commit is to detect any use that may
have gone unnoticed in WMF production from Codesearch analysis alone,
where no usage was found.

Bug: T292269
Change-Id: Id40679f21cc7a3f77a1b96a4bbd55daeaea16892
2021-10-09 03:00:45 +00:00
jenkins-bot
dfd0c73975 Merge "RCFilters: Merge mediawiki.rcfilters.filters.dm into ui module" 2021-10-09 02:43:33 +00:00
DannyS712
bad94719a8 RCFilters: Merge mediawiki.rcfilters.filters.dm into ui module
The new module retains the name .ui name so that existing
skin style overrides continue to work. We can consider renaming it
to just "mediawiki.rcfilters.filters" in a future patch.

This does not handle file reorganization, since both of the
modules used package files - instead, in the main script we also
require() the old main script for the .dm module so that its
setup code runs. But, we did need to rename the virtual
config file from the .dm module to not clash with the
virtual config file from the .ui module, since the
latter uses a callback instead of retrieving configuration
variables directly. These can be merged later as well.

Bug: T256836
Change-Id: I5ec0af8b8e6bcdba6b7881f946f777b854a33739
2021-10-09 02:23:13 +00:00
Timo Tijhof
d457762706 resourceloader: Remove obsolete logic for handheld=yes pageviews
This feature was removed in 2013 (Ia8d79b4a, T49504), with further
remnants removed in (1965df8df3, I7c24128f7b1).

* Simplify the code of transformCssMedia() as it now only needs to
  support printable=yes.
* Remove query parameter abstraction from test cases, use query
  array directly.
* Remove internal use of the $handheld parameter.
  Function signature of makeLoaderQuery() left in-tact for
  compatibility with $extraData. This will be deprecated and removed
  in a follow-up commit.

Bug: T49504
Bug: T32956
Change-Id: Id16ef3f4630538de1887ac2327eb317c6c6b1f9d
2021-10-09 02:47:39 +01:00
jenkins-bot
fea7834a73 Merge "ApiBase: Annotate deprecated constants individually" 2021-10-09 01:23:50 +00:00
Reedy
fb235068b8 Remove deprecated ApiBase::PARAM_VALUE_LINKS
Change-Id: I1c544ef58ebb2c83ebdcf7284a8dad2ed364c608
2021-10-09 01:44:42 +01:00
Reedy
bec8ed61da ApiBase: Annotate deprecated constants individually
Change-Id: I30f2e21eb5d10a54fa5955586be14d9c3eddf056
2021-10-09 01:40:18 +01:00
jenkins-bot
ec3ab502f9 Merge "Convert TrackingCategories to a service with DI" 2021-10-09 00:19:26 +00:00
jenkins-bot
0ee5a485a8 Merge "ResourceLoaderContext: Set message 'interface' flag and unique 'title'" 2021-10-08 23:49:52 +00:00
jenkins-bot
26cdf2cfb0 Merge "Upgrading psr/log (1.1.3 => 1.1.4)" 2021-10-08 22:56:18 +00:00
jenkins-bot
04bcaf9b5d Merge "composer.json: Relax some constraints for some dev requirements" 2021-10-08 22:01:06 +00:00
jenkins-bot
1fb55b0c57 Merge "Update pear/*" 2021-10-08 21:58:46 +00:00
jenkins-bot
549ff25cf1 Merge "DeleteAction-related cleanup, part 3" 2021-10-08 21:22:48 +00:00
jenkins-bot
83d7e03366 Merge "Fix height of traditional galleries in new media dom" 2021-10-08 21:09:00 +00:00
Reedy
7735af1e27 Upgrading psr/log (1.1.3 => 1.1.4)
Change-Id: If11d0081355eb9caa157fb92389d92ac65b27d4e
Depends-On: I5c4006f5747075a92a78900606e196d33c6d9a8f
2021-10-08 21:51:56 +01:00
Reedy
000ae1d062 composer.json: Relax some constraints for some dev requirements
Change-Id: Ife7ddb98e3c1064a4e4e70f119549b2a1394e2d7
2021-10-08 21:51:21 +01:00
Reedy
659fd89408 Update pear/*
- Upgrading pear/mail_mime (1.10.9 => 1.10.11)
  - Upgrading pear/net_smtp (1.9.2 => 1.10.0)

Depends-On: Ib698ef15b6f97ea637aedcc6ef26860c8c4a2cd0
Change-Id: I287e148a9078866a55e5f04693406374d8cca976
2021-10-08 21:50:17 +01:00
jenkins-bot
885d99fcb9 Merge "Remove unimplemented "bogus" parts of CleanupPreferences" 2021-10-08 20:37:47 +00:00
DannyS712
b9663bed45 Convert TrackingCategories to a service with DI
Bug: T247194
Change-Id: I50012e2a5e65aeee7671023d2fd5367e21e8ae67
2021-10-08 16:36:20 -04:00
Kunal Mehta
e7a4225596 tests: MWHttpRequestTest is a unit test, not an integration test
Change-Id: Iea8aff749c4e7da3fbfb0f6c3fbefd450d9a3b6a
2021-10-08 12:24:34 -07:00
jenkins-bot
e13337b0ca Merge "OutputPage: Remove redundant "rel=edit" head link after "x-wiki" link" 2021-10-08 19:12:38 +00:00
Arlo Breault
2845964ff8 Fix height of traditional galleries in new media dom
Follow up to Iff2bdc3aa02f84f0bf4ca55d177706823934cc08

This corrects an omission from the previous patch, aligning it with Parsoid's output.

Change-Id: Ic64af85f5969717a4ea536a695874359a13645c5
2021-10-08 17:57:44 +00:00
jenkins-bot
d89909fd0a Merge "Respect the timeout set in wgVirtualRestConfig" 2021-10-08 17:21:23 +00:00
jenkins-bot
0138ad8efd Merge "Fix bad calculation in TitleWidget" 2021-10-08 15:17:41 +00:00
jenkins-bot
cd9c0ba6c0 Merge "Rename ParserOutput::{get,set,unset}Property to {get,set,unset}PageProperty" 2021-10-08 14:47:30 +00:00
Daimona Eaytoy
bbc5bbe9ac Fix bad calculation in TitleWidget
Follow-up: Ieab0606068a78e5b5e5b9b3337f3a75a0b64adbc

This is concatenating an object and a number, so the index is always
  "[object Object]0.5"

Ops :)

Bug: T292600
Change-Id: Icf9df9a3e1fbbb08f1868131cf3fb740ee3a3e08
2021-10-08 16:34:16 +02:00
C. Scott Ananian
5b515cfaf0 Hard deprecate the renamed ParserOutput::*Property() methods
Code search:
https://codesearch.wmcloud.org/deployed/?q=%5BOo%5Dutput-%3E%28get%7Cset%7Cunset%29Propert%28y%7Cies%29%5C%28&i=nope&files=&excludeFiles=&repos=
https://codesearch.wmcloud.org/deployed/?q=%5BOo%5Dutput%5C(%5C)-%3E(get%7Cset%7Cunset)Propert(y%7Cies)%5C(&i=nope&files=&excludeFiles=&repos=

Bug: T287216
Depends-On: I2eed4a8215c58a7b7e2443f5e17d007f1cd9cf87
Depends-On: I6076142623fd82dfc4243bbc16ea770635ee8c32
Depends-On: Ifd70418bf2f8f443c9b396b4b674a5a025b595a5
Depends-On: I43954809cd53d3c97fe20651e3de00ad1d3a4d59
Depends-On: Ic6c677679459ff2d1c500d4885431d38058eaed0
Depends-On: Ide0188576f005e0435229cc1e9c01dce68a2f657
Depends-On: I1633f6fa00193df6ea1d6633de07bc8d2b269cbf
Depends-On: Id4581c6c45f9fc4690900a30d8172951bc461a1b
Depends-On: I551a6d33cb24edc8a1b699bf5ac6775cb7ebe9d7
Depends-On: Ifefda53c70d97238290f2d6e735721ce75707050
Depends-On: I7f1b9fe5cfc34c37e9745b9c9118b0e13e94f200
Change-Id: Iad0181850c956d7bb59cf3b0315cf3a3848f9cab
2021-10-08 10:32:46 -04:00
C. Scott Ananian
af5d13c5de Rename ParserOutput::{get,set,unset}Property to {get,set,unset}PageProperty
The ::getProperty() naming is too generic and doesn't clearly indicate
that these are "page properties" (which have their own table in the DB).
As part of refactoring a clean API out of ParserOutput which can be used
by Parsoid, clean up the naming here.

Soft-deprecation in this patch, there are a handful of external users
which need to be cleaned up before we hard-deprecate.

Bug: T287216
Change-Id: Ie963eea5aa0f0e984ced7c4dfa0fd65d57313cfa
2021-10-08 10:07:17 -04:00
Matěj Suchánek
01913e4731 Make ArchivedRevisionLookup a service
Dependency injection and cleanup. Rename ::isDeleted
to more clear ::hasArchivedRevisions.

Bug: T290022
Change-Id: Ifff6076f79ee2ad08e4635fba8fd141e4de93b01
2021-10-08 11:01:32 +02:00
Matěj Suchánek
21ec2fb282 Move methods from PageArchive to new ArchivedRevisionLookup
Copy and paste methods. Subsequent patches will tidy this up.
Also improve test coverage.

Bug: T290022
Change-Id: I549ecc3ec89f0303a3cc342916f06da4bf77595e
2021-10-08 10:30:49 +02:00
Translation updater bot
b68c15d11e Localisation updates from https://translatewiki.net.
Change-Id: Iad856b7d4fd6b67c0f64cf187e20357d185088d4
2021-10-08 09:05:53 +02:00
Bartosz Dziewoński
2769e5f49b ResourceLoaderContext: Set message 'interface' flag and unique 'title'
Bug: T291601
Change-Id: I6375aa97faa794caad74546ebc5e7040ead38129
2021-10-08 00:15:33 +00:00
jenkins-bot
35098e1763 Merge "Use child combinator to only apply style to gallery for new media dom" 2021-10-07 23:13:30 +00:00
jenkins-bot
af9bbfe40f Merge "mediawiki.String: Add new functions lcFirst and ucFirst" 2021-10-07 22:28:35 +00:00
jenkins-bot
eab21b9850 Merge "Remove unnecessary spaces in parameters of jQuery calls" 2021-10-07 22:28:30 +00:00
jenkins-bot
dad4e4237e Merge "Tweak Tidy handling in editTests.php" 2021-10-07 21:57:21 +00:00
jenkins-bot
91ed4de3b1 Merge "Get rid of ParserOptions::setTidy()" 2021-10-07 21:52:48 +00:00
Fomafix
ee640a6f57 Remove unnecessary spaces in parameters of jQuery calls
Change-Id: Ic5ce3bc2af3499a89df683c4405a52ea464238c7
2021-10-07 21:35:40 +00:00
jenkins-bot
c65c7e4039 Merge "phpunit: Drop bypass for now-fixed dberror from SpecialPageFatalTest" 2021-10-07 20:29:42 +00:00
Subramanya Sastry
acc7c9b1b1 Tweak Tidy handling in editTests.php
* Tidy is always enabled, so enable/disable tidy checks not needed
* +tidy parsertest options are gone. So, tweak how output sections
  are switched around.

Bug: T198214
Change-Id: I735a9dc2979bcc165423bfdc3ffca12c5602e2c1
2021-10-07 15:23:47 -05:00
Subramanya Sastry
f70b15558f Get rid of ParserOptions::setTidy()
Bug: T198214
Change-Id: I90ea6ce6831caa92e5d88d843132161a5fc66184
2021-10-07 15:13:59 -05:00
jenkins-bot
58652c0e3d Merge "Improve side-locking logic for diffs" 2021-10-07 17:25:50 +00:00
jenkins-bot
8bd5a616e1 Merge "upload.js: Remove parameters for message 'largefileserver'" 2021-10-07 15:55:44 +00:00
jenkins-bot
aead92cf86 Merge "mediawiki.action.edit.preview: Avoid double escaping of message 'preview'" 2021-10-07 15:38:24 +00:00
jenkins-bot
8d61cb09b6 Merge "Use shortcut mw.msg( ... ) instead of mw.message( ... ).text()" 2021-10-07 15:34:28 +00:00