Commit graph

8 commits

Author SHA1 Message Date
Umherirrender
3124a990a2 Use ::class to resolve class names in includes files
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: I07a925c2a9404b0865e8a8703864ded9d14aa769
2018-01-27 20:34:29 +01:00
PiRSquared17
3430278e37 Document Special:Diff and Special:PermanentLink
If no revision is given to Special:Diff or PermaLink show a form
(cf. Special:ComparePages)
List these on Special:SpecialPages under "redirects".

Bug: 45221
Change-Id: I77edd4a1bbd342d4d18c27d5bc10dac76b8ab6c9
2017-08-10 19:48:05 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Federico Leva
e928d5bdd0 Allow to customise addHelpLink() target via system message
Method similar to SpecialPage::outputHeader() to avoid registering
tons of system messages and to have -summary and -helppage tidily
listed together in Special:AllMessages by default.

Bug: T45591
Change-Id: Ic849dde00be7379c1909a8486cf20f48c5aea5cf
2015-05-15 10:14:28 +02:00
Timo Tijhof
f95dc8faff specials: Clean up redirect special pages ($subpage can be null)
$subpage being null is clearly documented in SpecialPage::run,
SpecialPage::execute, and most special page subclasses.

But all the redirect subclasses only copied part of the typehint,
making it look like it's always a string.

For SpecialMyLanguage, follows-up b1853bba0. Don't cast null to
empty string, and don't bother giving Title::newFromText an empty
string only to bail out with null again.

Also:
* Add visibility 'public' where missing.
* Add or correct relevant documentation comments.
* In SpecialMyRedirectPages, handle error first and avoid having
  final return inside a conditional; Remove redunant 'else'.

Change-Id: Ie3543f44011832b198bb3d3e32528b6a2868dee1
2015-04-13 20:10:00 +01:00
Federico Leva
9e60a2cc7e Add help link to three other "minor" special pages
Bug: T45591
Change-Id: If8efa314fbd8f7469aa018135ad0f611f8806b48
2015-03-18 14:21:16 +01:00
Sorawee Porncharoenwase
1e4d675b16 Prevent Special:Diff from processing empty string
Umherirrender found that I77fdaf8e has a flaw. Currently it is possible
to go to index.php?title=Special:Diff (without any trailing string),
and the page will be redirected to index.php?diff= which is the last diff
of the main page. However, the intended way to deal with this case is to
raise ErrorPageError. This patch fixes the problem.

Change-Id: I3ff0b11671f27e77d9068930338ec8bbb674a89f
2014-02-22 16:14:54 +00:00
Jérémie Roquet
ecc8114014 Add Special:Diff as an internally-linkable redirect to diff pages
This is similar to Special:PermanentLink added in r79036 and has been
asked for several times in different places, including:
- on the English Wikipedia (oldid=539308532)
- on mediawiki.org (lqt_oldid=31691)
- on the French Wikipedia (oldid=93029892)
- on the English Wikipedia again (oldid=588408888)

A notable use-case is linking to diffs in the edit summaries, where
external links are not yet allowed (bug 14892).

All of the following are valid usages:
- [[Special:Diff/12345]] (diff of a revision with the previous one)
- [[Special:Diff/12345/prev]] (diff of a revision with the previous one as well)
- [[Special:Diff/12345/next]] (diff of a revision with the next one)
- [[Special:Diff/12345/cur]] (diff of a revision with the latest one of that page)
- [[Special:Diff/12345/98765]] (diff between arbitrary two revisions)

Co-authored-by: Jérémie Roquet <jroquet@arkanosis.net>
Co-authored-by: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: I77fdaf8e04375caa1d67ca4a3ec3bd93920c3309
2014-01-25 21:41:08 +01:00