'name' => 'unhide',
),
), $this->getContext(), 'compare' );
- $form->setSubmitText( wfMsg( 'compare-submit' ) );
+ $form->setSubmitTextMsg( 'compare-submit' );
$form->suppressReset();
$form->setMethod( 'get' );
$form->setSubmitCallback( array( __CLASS__, 'showDiff' ) );
$form->trySubmit();
}
- public static function showDiff( $data ){
+ public static function showDiff( $data, HTMLForm $form ){
$rev1 = self::revOrTitle( $data['Revision1'], $data['Page1'] );
$rev2 = self::revOrTitle( $data['Revision2'], $data['Page2'] );
if( $rev1 && $rev2 ) {
- $de = new DifferenceEngine( null,
+ $de = new DifferenceEngine( $form->getContext(),
$rev1,
$rev2,
null, // rcid
}
$title = Title::newFromText( $value );
if ( !$title instanceof Title ) {
- return wfMsgExt( 'compare-invalid-title', 'parse' );
+ return $this->msg( 'compare-invalid-title' )->parseAsBlock();
}
if ( !$title->exists() ) {
- return wfMsgExt( 'compare-title-not-exists', 'parse' );
+ return $this->msg( 'compare-title-not-exists' )->parseAsBlock();
}
return true;
}
}
$revision = Revision::newFromId( $value );
if ( $revision === null ) {
- return wfMsgExt( 'compare-revision-not-exists', 'parse' );
+ return $this->msg( 'compare-revision-not-exists' )->parseAsBlock();
}
return true;
}