Pass user to WikiPage::doDeleteArticleReal
[lhc/web/wiklou.git] / includes / page / Article.php
index 450251a..f213f6a 100644 (file)
@@ -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 );
@@ -1706,10 +1706,8 @@ class Article implements Page {
 
                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 = '';
@@ -1797,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();