Commit graph

10 commits

Author SHA1 Message Date
Amir Sarabadani
bbe704b5c1 Reorg: Move some of request related classes to MediaWiki/Request
Redoing I5ea70120d74 but without moving WebRequest that caused issues
with phan-taint-plugin.

Moving:
 - DerivativeRequest
 - FauxRequest
 - FauxRequestUpload
 - PathRouter
 - WebRequestUpload

Bug: T321882
Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
2022-10-28 10:15:31 +00:00
Zabe
f6b9381d7f Revert "Reorg: Move some of request related classes to MediaWiki/Request"
This reverts commit 2bdc0b2b72.

Reason for revert: T166010#8349431

Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
2022-10-27 13:14:16 +00:00
Amir Sarabadani
2bdc0b2b72 Reorg: Move some of request related classes to MediaWiki/Request
Moving:
 - DerivativeRequest
 - FauxRequest
 - FauxRequestUpload
 - PathRouter
 - WebRequest
 - WebRequestUpload

Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
2022-10-26 16:49:10 +02:00
Thiemo Kreuz
61ae7504df Replace trivial usa of mock builder with createMock() shortcut
createMock() does the same, but is much easier to read.

A small difference is that some of the replacements made in this
patch didn't use disableOriginalConstructor() before. In case this
was relevant we should see the respective test fail. If not we can
save some CPU cycles and skip these constructors.

Change-Id: Ib98fb06e0fe753b7a53cb087a47e1159515a8ad5
2022-07-15 16:43:48 +00:00
Umherirrender
047c184bfe tests: Use Title::makeTitle instead of Title::newFromText
Avoid parsing known titles in tests to improve performance

Change-Id: Ibfccfe696f0b8bfda0b99abae324e60bbecef7d8
2022-07-06 00:44:00 +02:00
Umherirrender
770f905900 tests: Use namespaced IDatabase class
Change-Id: I7171ff26faee00d9eaabc33c2f3d91049ea0b40d
2022-05-28 00:09:55 +02:00
Bartosz Dziewoński
2ec4f9d466 HistoryPager: Refactor to avoid special handling for the last row
Displaying each row requires the revision ID from the next row, to
create the 'undo' and 'prev' links. (These links specifically refer to
the next displayed row, according to the current filters, and not just
the previous revision, like the byte diff numbers.)

Previously this class would override normal row formatting to display
the previous row instead when the normal pager would display the
current row, and then handled the last row specially. This code dates
back to 2006: 20949b0961. It was complicated, and got more complicated
when grouping by dates was introduced (ed63ede657), when it caused the
last row to be displayed in a separate list.

Thanks to the addition of batch processing in f7f84dddb3, we don't
need to do that any more: the necessary information about revisions is
pre-computed and we can just look up the ID for next row while
displaying the previous one.

Bug: T303210
Change-Id: I838b0bd4c04faf4f83b21282deb757207ab1732a
2022-04-11 18:31:12 +02:00
Matěj Suchánek
79577c79ff changetags: Fix management of a '0' tag
The tag wouldn't be treated as active, wouldn't be displayed
in changes lists and it wouldn't be possible to filter it,
although it was possible to create it.

The changes in ::modifyDisplayQuery are needed, because
ContribsPager may provide false.

Add a regression test for ::formatSummaryRow.

Bug: T296642
Change-Id: Iddb1e978387a0009425f6fad1821d9d15c0f5f23
2022-03-03 22:24:01 +00:00
Bartosz Dziewoński
f72ea9d685 Add <section> wrappers around pagers grouped by date
Bug: T298638
Change-Id: I556834a21bf5f32385f920f7a429393991597c89
2022-02-28 21:23:35 +00:00
jdlrobson
ed63ede657 ReverseChronologicalPager pages have list headers grouping by date
These list headers are added to the HTML but hidden by default.
They are needed for the mobile version which displays headers
for better scannability.

However the change will only display on:
* Special:Contributions
* history page
* Special:MergeHistory

Bug: T298638
Change-Id: Iaa55eab57f761c9be780aba79cf2b9b212d91657
2022-02-15 00:04:56 +00:00