* @return string|bool String containing article contents, or false if null
* @deprecated since 1.21, use WikiPage::getContent() instead
*/
- function fetchContent() { #BC cruft!
+ function fetchContent() {
+ // BC cruft!
+
ContentHandler::deprecated( __METHOD__, '1.21' );
if ( $this->mContentLoaded && $this->mContent ) {
}
# Should the parser cache be used?
- $useParserCache = $this->mPage->isParserCacheUsed( $parserOptions, $oldid );
+ $useParserCache = $this->mPage->shouldCheckParserCache( $parserOptions, $oldid );
wfDebug( 'Article::view using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
if ( $user->getStubThreshold() ) {
$this->getContext()->getStats()->increment( 'pcache_miss_stub' );
$outputPage->addModules( 'mediawiki.action.view.redirect' );
// Add a <link rel="canonical"> tag
- $outputPage->setCanonicalUrl( $this->getTitle()->getLocalURL() );
+ $outputPage->setCanonicalUrl( $this->getTitle()->getCanonicalURL() );
// Tell the output object that the user arrived at this article through a redirect
$outputPage->setRedirectedFrom( $this->mRedirectedFrom );
if ( $user->isAllowed( 'suppressrevision' ) ) {
$suppress = Html::openElement( 'div', array( 'id' => 'wpDeleteSuppressRow' ) ) .
- "<strong>" .
- Xml::checkLabel( wfMessage( 'revdelete-suppress' )->text(),
- 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '4' ) ) .
- "</strong>" .
+ Xml::checkLabel( wfMessage( 'revdelete-suppress' )->text(),
+ 'wpSuppress', 'wpSuppress', false, array( 'tabindex' => '4' ) ) .
Html::closeElement( 'div' );
} else {
$suppress = '';
Xml::closeElement( 'form' );
if ( $user->isAllowed( 'editinterface' ) ) {
- $link = Linker::link(
+ $link = Linker::linkKnown(
$ctx->msg( 'deletereason-dropdown' )->inContentLanguage()->getTitle(),
wfMessage( 'delete-edit-reasonlist' )->escaped(),
array(),
*/
public function doDelete( $reason, $suppress = false ) {
$error = '';
- $outputPage = $this->getContext()->getOutput();
- $status = $this->mPage->doDeleteArticleReal( $reason, $suppress, 0, true, $error );
+ $context = $this->getContext();
+ $outputPage = $context->getOutput();
+ $user = $context->getUser();
+ $status = $this->mPage->doDeleteArticleReal( $reason, $suppress, 0, true, $error, $user );
if ( $status->isGood() ) {
$deleted = $this->getTitle()->getPrefixedText();