| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow up to a468534. The caching added to RCCacheEntryFactory
would be utilized only by EnhancedChangesList. This should
improve performance for OldChangesList, too.
Bug: T341319
Change-Id: Ibb1907732c71d0783d1a627063debb2a484cafe7
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Iefe896769359f0d32e52bf20aa03e1c3715d5074
|
|/
|
|
| |
Change-Id: Iad19dc62c4a06ccdb553ed11b3390679c761e17e
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I635eaf947280fd1071e308b19715d581e1c1cb15
|
|/
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
| |
Also split the cache by context, like it's done
in ::insertTags. Follows-up 17deb8353b (I0b5e48ef5).
Change-Id: I5b539a63c3210a8cd1debb2ba625b0f2dedacc39
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Done automatically based on a php parser written on top of ANTLR4
Bug: T335377
Change-Id: Ie8fabc594edab18e55cb1d5bbf573762106e3d71
|
|/
|
|
|
|
| |
This came up during code review of change I91588aebae7e49e3d3c.
Change-Id: I0b5e48ef52513f012bfbb460ab5a649178ebf255
|
|
|
|
|
|
|
|
|
|
|
|
| |
"BadMethodCallException" sounds like it would fit, but it does
have a very different meaning, described as "exception thrown if
a callback refers to an undefined method or if some arguments are
missing". This is not what's going on here. These are methods that
should only be called from unit tests.
This appears to be a common mistake, often copy-pasted.
Change-Id: Ib39e28f596a883481d5f526460a5c871c75f5313
|
|\
| |
| |
| | |
Tags parsing"
|
| |
| |
| |
| |
| |
| |
| | |
Rendering UserLinks or Tags requires parsing, which when run on thousands of records, adds up to a significant amount of processing time. More often than not, this can be optimized by storing already visited tags or user links as those "renders" will not change for the single request run and are repeated constantly on the list.
Bug: T341319
Change-Id: I91588aebae7e49e3d3cb77702cf28677b4a14c8d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The collapsing on the enhanced changes list now works without
JavaScript.
Keyboard navigation is still supported but only the space and not the
return toggles the collapsing toggle button.
The <input type="checkbox"> element needs an unique identifier in the
`id` attribute and the same value must be in the `for` attribute of the
<label> element. A simple counter in the class EnhancedChangesList
starts twice from the beginning if the recent changes get included as:
{{Special:RecentChanges|enhanced=1}}
{{Special:RecentChanges|enhanced=1}}
Therefore a random value is used as checkbox identifier.
The module 'jquery.makeCollapsible' and its classes `mw-collapsible`,
`mw-collapsed` and `mw-collapsible-toggle-collapsed` are not needed
anymore.
The icons from module 'mediawiki.icon' are directly included because the
module has fixed selectors which do not fit here.
Bug: T172618
Change-Id: Iafd27e5d760b78ae386d833946005f86cee8dd64
|
|/
|
|
|
|
|
|
| |
When the value of the associated array is not used, there is no need to
use array_keys and create internal a copy of the array, just omit the
value with $_ to tell static analyzer that the var is unused.
Change-Id: I5c6d667e98c0167c0573c683f0d617bc1d4ca619
|
|
|
|
|
|
|
| |
The main goal is to make this code faster and easier to read, and to
avoid duplication.
Change-Id: I925d742d560e9d90e3ecc9ff19fe7e87b60bf9a4
|
|
|
|
|
| |
Bug: T328220
Change-Id: I0408575ee71e58d1c9e9ebedabab35bd3813f515
|
|
|
|
|
| |
Bug: T328220
Change-Id: I3c36835fbd90acc301731e2b33ae4815cd4b0cc5
|
|
|
|
|
|
|
|
| |
I did this using a script written on top of antlr4 parser so it doesn't
have some clean ups a human would do but it's pretty nice already.
Bug: T330640
Change-Id: I608566700c6d737ee986bf47dda87effc69614d6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move the current URL logic from IRCColourfulRCFeedFormatter
to a new method RecentChange::getNotifyUrl (covered by tests now).
* Re-use this method in MachineReadableRCFeedFormatter so that
the diff/patrol/rcid etc URL is also available in the modern
JSON-based EventStreams service. And in particular to allow
porting of the legacy irc.wikimedia.org backend to a much simpler
one that is based on this.
* Also expose a title_url field which was previously missing,
and made consumption of the data needlessly difficult.
Bug: T234234
Depends-On: Id740134ef30b2276688d7b7caedb6bb652158761
Change-Id: Ic3e0aebdb61b5c0e5fbed08656db4a1e90b67518
|
|
|
|
|
|
|
|
|
| |
The Hooks class contains deprecated functions and the whole class is
going to get removed, so remove the convenience function and inline the
code.
Bug: T335536
Change-Id: I8ef3468a64a0199996f26ef293543fcacdf2797f
|
|
|
|
|
|
|
|
|
|
| |
Make this subroutine same as that in ::recentChangesBlockLine.
This solves the illogical issue where diff links would be displayed
only for ungrouped categorization entries, but not within groups
of them, making such entries useless for patrolling.
Bug: T270662
Change-Id: Ib4f02673cb47b42fcb1c2268691ca41cd637b0c5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Illegal string offset and invalid argument supplied to foreach, due to incorrect type information
* Array internal pointer reset is unnecessary
* $hookData unused since MW 1.35 due to incomplete revert
* array_push() with single element
* Unnecessary sprintf()
* for loop can be replaced with str_repeat()
* preg_replace() can be replaced with rtrim()
* array_values() call is redundant
* Unnecessary cast to string
* Unnecessary ternary. Often the result relies on short-circuit evaluation, but I find it more readable nonetheless.
Change-Id: I4c45bdb59b51b243fa96286bec8b58deb097d707
|
|
|
|
|
|
|
|
|
| |
There was no clean way to do this but using the global state.
The parameter is three-state to keep backward compatibility.
Bug: T304428
Change-Id: I01c5f8e9646cbe861516100c3b8d165aefb95ca0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code assumed that curid is same for all changes in the block
(more precisely, the first one applies to all others).
This is not true when the block includes categorization changes.
Refactor the code to prefer individual link params instead of
global approach.
Bug: T270774
Change-Id: Id2286392239b67a44fbb2e95346daad9fc2a0e4f
|
|/
|
|
|
| |
Bug: T34038
Change-Id: I94d63d708b5ef0ed15dcb2c4a5bff4d2300625f0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rc_this_oldid and rc_last_oldid of categorization entries
reference revisions of the page that had its categorization
changed rather than the category page itself. These should
not be considered when building the diff link(s).
Introduce new aggregate variable $allCategorization and use
it instead of examining $rcObj (which deals only with the last
change in the block).
Finally, drop the ::userCan check deciding whether the user
can see the diff. It wouldn't work properly either, because
it would check only the last (oldest) entry in the block, not
the first (newest) and the one before the last.
Bug: T261068
Change-Id: I10bdfbad9d8a36f210ffd11a832604104f8ecdc5
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was definitely already wrong when it was added in 2008
(r33013). !$type will return true for RC_EDIT (!0), false for
all other types (RC_NEW, RC_LOG, etc.). The weak equality
comparison then casts RC_LOG to boolean (3 -> true).
So the first condition will pass if and only if $type is
RC_EDIT.
As this piece of code lasted for 15 years and there
seems to be no objection to the behavior, I just
rewrite it to make it more clear and keep the same
behavior.
Cudos to Thiemo Kreuz who disassembled the code.
Change-Id: I93f853b2a191fc3011b47fcd1ac22ac649ce541a
|
|/
|
|
|
|
|
| |
Keep action=history after curid=, like was done in 39783472b.
Follows up I1aa3be64f9b4e9c63cb72037b131361616f76292.
Change-Id: Ie319052754c910857adca370e1d7c8b8ff9d7618
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
No functional changes, pure refactoring.
- Merge two loops over the same array.
- Move "enhancedrc-since-last-visit" message generation
where it actually is needed. This should save a bit of time.
- Store the title in a variable.
- New-style comments.
Change-Id: I1aa3be64f9b4e9c63cb72037b131361616f76292
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This branch has the identical output as the default one.
There is probably no reason for unpatrolled new pages
to be handled separately (and skip check for special pages).
Change-Id: I1f2f2dcc6fe9f6b4a6b2f6d920adb6eede5fdc1f
|
| |
| |
| |
| |
| |
| | |
… and where it improves readability, in my opinion.
Change-Id: I4f3bc6067dfac16841ed74c00a4c81215d0f5249
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: T326396
Change-Id: I09a407f24572312c9ec2ce9653ebbf28ea7819c1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Follows-up I9bfa502a0b (9b8f153f). Also document the reason for
this logic, to the best of my knowledge, and some ideas to improve
it.
Bug: T305093
Change-Id: I4c5bf4d4da83ff1e03d0fe0dd9891507b1f1e455
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem this patch fixes:
- Step 1: Move an existing page A to a new title B.
- Step 2: Delete the redirect at the old title A.
- What happened: All the edits made to the page prior to the move
are gone from recent changes.
- What should have happened: all the edits made to the page prior
to the move are still in recent changes under the (now redlinked)
title A.
Contrary to that, moving a page with redirect suppression would
preserve the changes.
Bug: T140960
Bug: T307865
Change-Id: Ib52a9c657620275388012a778bc9d839dd740624
|
| |
| |
| |
| |
| |
| | |
Bug: T326395
Bug: T326396
Change-Id: Ia3966f59c271e3c9826c170ffb580715f4ee5a35
|
|/
|
|
|
|
| |
Bug: T326395, T326396
Depends-On: I6b98a2f9a59922eb923bad8c39cad05514b5fc66
Change-Id: If70d610c98fb56d957d947a61310064afef2c367
|
|
|
|
|
| |
Bug: T86704
Change-Id: I14abf71b7dcf432d0eb35f0b4ab2fa4fb797e2e8
|
|
|
|
|
|
|
|
|
| |
I9cae1afa made the order of 'curid=...' and 'action=history' in the
history links for category changes inconsistent with other history links
on the changeslist.
Bug: T264491
Change-Id: I311c375d9250ab8a92bcf8e0b79af9e075487f96
|
|
|
|
|
|
|
|
| |
Also, added a parameters to XmlDumpWriter so that they could be
inject via WikiExporter.
Bug: T325475
Change-Id: I84b82506509e2c09dad0691af2df958a5af5b5b0
|
|
|
|
|
|
|
|
|
|
| |
so that extensions (i.e. CheckUser) can implement their own comment
store without having a lot of code duplication
basically the comment store version of I3a6486532f2ef36
Bug: T233004
Change-Id: Ib40f99e00a514d41776ce521baf113e46d37e9cd
|
|
|
|
|
|
|
|
|
| |
Patch Ifa7a9bc replaced some longer `=== null` constructs with the
new ??= operator we have since PHP 7.4. However, some of these can be
simplified even more with the ?? operator we have since PHP 7.0.
Follow-Up: Ifa7a9bc7b2ec415ad7ecb23f4c1776f51f58fd6b
Change-Id: I7b05e723810558bb5437adc97eab54ca04d38c06
|