Pass user to WikiPage::doDeleteArticleReal
[lhc/web/wiklou.git] / includes / page / Article.php
index 8a11844..f213f6a 100644 (file)
@@ -574,7 +574,7 @@ class Article implements Page {
                }
 
                # 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' );
@@ -1000,7 +1000,7 @@ class Article implements Page {
                                $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 );
@@ -1772,7 +1772,7 @@ class Article implements Page {
                        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(),
@@ -1795,8 +1795,10 @@ class Article implements Page {
         */
        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();