Some cleanup to Article::view() and related:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 14 Nov 2011 18:05:55 +0000 (18:05 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 14 Nov 2011 18:05:55 +0000 (18:05 +0000)
commit81be80e6accedc49dcc17638b57096c43eed9158
tree6022480e7640ea28d7e5307fdb6d05648a773738
parent1d854ce731c03b8c717aa6b78185864611d5af50
Some cleanup to Article::view() and related:
* Moved the page check if oldid was given from Article::fetchContent() to Article::getOldidIDFromRequest() so that it's done directly when executing Article::view(); this should not happen though for normal view requests since oldid and related are checked in MediaWiki::parseTitle()
* Removed $oldid parameter from Article::fetchContent() and always use the oldid parameter passed either in the constructor or the request; also changed call from Article::loadContent() to Article::fromContent() since the former is now only a redirect to the latter
* Moved the 'read' permission check to the beginning of Article::view() since the Title is now correct directly after calling Article::getOldID()
* Merged the two calls to the parser cache and make WikiPage::isParserCacheUsed() also return true when the latest revision id is given. Article::setOldSubtitle() is still called when the oldid is passed to display the "You are view the current revision of this article".
* Also moved the non-existing page check a bit up to avoid running a good part of useless code when the page doesn't exist
* Merged two calls to Title::quickUserCan( 'edit' ) to set edit sections to false
includes/Article.php
includes/WikiPage.php