parent::__construct( 'MergeHistory', 'mergehistory' );
}
+ public function doesWrites() {
+ return true;
+ }
+
/**
* @return void
*/
// 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;
$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 ) );