X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/74c929b24b048c9f1e31e17db757ae4195cd7673..dc9cc5d707f5a612938cc9371614cc41c328fda2:/includes/specials/SpecialMergeHistory.php diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index f870406c..c51ce7c3 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -97,7 +97,7 @@ class MergehistoryForm { ); } - if ( $this->mTargetObj->equals( $this->mDestObj ) ) { + if ( $this->mTargetObj && $this->mDestObj && $this->mTargetObj->equals( $this->mDestObj ) ) { $errors[] = wfMsgExt( 'mergehistory-same-destination', array( 'parse' ) ); } @@ -142,7 +142,7 @@ class MergehistoryForm { } private function showHistory() { - global $wgLang, $wgContLang, $wgUser, $wgOut; + global $wgLang, $wgUser, $wgOut; $this->sk = $wgUser->getSkin(); @@ -163,27 +163,22 @@ class MergehistoryForm { if( $haveRevisions ) { # Format the user-visible controls (comment field, submission button) # in a nice little table - $align = $wgContLang->isRtl() ? 'left' : 'right'; $table = Xml::openElement( 'fieldset' ) . - Xml::openElement( 'table' ) . + wfMsgExt( 'mergehistory-merge', array('parseinline'), + $this->mTargetObj->getPrefixedText(), $this->mDestObj->getPrefixedText() ) . + Xml::openElement( 'table', array( 'id' => 'mw-mergehistory-table' ) ) . " - " . - wfMsgExt( 'mergehistory-merge', array('parseinline'), - $this->mTargetObj->getPrefixedText(), $this->mDestObj->getPrefixedText() ) . + " . + Xml::label( wfMsg( 'mergehistory-reason' ), 'wpComment' ) . " - - - " . - Xml::label( wfMsg( 'undeletecomment' ), 'wpComment' ) . - " - " . - Xml::input( 'wpComment', 50, $this->mComment ) . + " . + Xml::input( 'wpComment', 50, $this->mComment, array('id' => 'wpComment') ) . "   - " . + " . Xml::submitButton( wfMsg( 'mergehistory-submit' ), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) . " " . @@ -439,7 +434,7 @@ class MergeHistoryPager extends ReverseChronologicalPager { return array( 'tables' => array('revision','page'), 'fields' => array( 'rev_minor_edit', 'rev_timestamp', 'rev_user', 'rev_user_text', 'rev_comment', - 'rev_id', 'rev_page', 'rev_text_id', 'rev_len', 'rev_deleted' ), + 'rev_id', 'rev_page', 'rev_parent_id', 'rev_text_id', 'rev_len', 'rev_deleted' ), 'conds' => $conds ); }