Merge "mw.Upload.BookletLayout: Don't explode when the API call fails with 'exception'"
[lhc/web/wiklou.git] / includes / specials / SpecialMergeHistory.php
index 145a12a..0a25180 100644 (file)
@@ -68,6 +68,10 @@ class SpecialMergeHistory extends SpecialPage {
                parent::__construct( 'MergeHistory', 'mergehistory' );
        }
 
+       public function doesWrites() {
+               return true;
+       }
+
        /**
         * @return void
         */
@@ -91,8 +95,8 @@ class SpecialMergeHistory extends SpecialPage {
 
                // target page
                if ( $this->mSubmitted ) {
-                       $this->mTargetObj = Title::newFromURL( $this->mTarget );
-                       $this->mDestObj = Title::newFromURL( $this->mDest );
+                       $this->mTargetObj = Title::newFromText( $this->mTarget );
+                       $this->mDestObj = Title::newFromText( $this->mDest );
                } else {
                        $this->mTargetObj = null;
                        $this->mDestObj = null;
@@ -476,10 +480,18 @@ class SpecialMergeHistory extends SpecialPage {
                $logId = $logEntry->insert();
                $logEntry->publish( $logId );
 
-               # @todo message should use redirect=no
-               $this->getOutput()->addWikiText( $this->msg( 'mergehistory-success',
-                       $targetTitle->getPrefixedText(), $destTitle->getPrefixedText() )->numParams(
-                       $count )->text() );
+               $targetLink = Linker::link(
+                       $targetTitle,
+                       null,
+                       array(),
+                       array( 'redirect' => 'no' )
+               );
+
+               $this->getOutput()->addWikiMsg( $this->msg( 'mergehistory-done' )
+                       ->rawParams( $targetLink )
+                       ->params( $destTitle->getPrefixedText() )
+                       ->numParams( $count )
+               );
 
                Hooks::run( 'ArticleMergeComplete', array( $targetTitle, $destTitle ) );