Display categories on File redirects
authorMatthias Mullie <git@mullie.eu>
Thu, 26 Jan 2017 13:43:19 +0000 (14:43 +0100)
committerMatthias Mullie <git@mullie.eu>
Tue, 4 Jul 2017 09:11:58 +0000 (11:11 +0200)
commit6a8fcd3a7e387d6172a540b87f7ccae0a39e45f6
tree4516d9ac9f44b089a24227ef5d0818d3b401cdea
parent884a54e910dc5b6f961b43a1f808da93bf2c8af3
Display categories on File redirects

This NS_FILE-specific redirect logic was introduced in 2008,
in 3c9536652a3b27ec97cb2e3f046c5e98849c58a4.

mTitle, as referenced to in the comments, no longer exists.
Article also no longer creates redirects in there, that’s now
in WikitextContent::fillParserOutput.
The original commit message describes that this was introduced
to be able to display redirects to foreign file repos. A lot
has changed in how that works since 2008, too :)

Back to the present: for redirects to foreign repos,
`$this->mPage->getFile()->getRedirected()` seems to always return
`null` (a placeholder object is created when the thing doesn’t
exist), so this this foreign repo-specific bit of code is bypassed
anyway. For local redirects, Article::view seems to be working just
fine.

By using Article::view, Categories used on file redirect pages
will now actually be displayed too.

And we can get rid of the otherwise no longer used Article::viewRedirect.

Bug: T29857
Change-Id: Icb02f3af32d10870f58d945cb06a84b3ba1305d3
RELEASE-NOTES-1.30
includes/page/Article.php
includes/page/ImagePage.php