summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialMergeHistory.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
committerPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
commitb9b85843572bf283f48285001e276ba7e61b63f6 (patch)
tree4c6f4571552ada9ccfb4030481dcf77308f8b254 /includes/specials/SpecialMergeHistory.php
parentd9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff)
updated to MediaWiki 1.14.0
Diffstat (limited to 'includes/specials/SpecialMergeHistory.php')
-rw-r--r--includes/specials/SpecialMergeHistory.php22
1 files changed, 12 insertions, 10 deletions
diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php
index 0460c207..f870406c 100644
--- a/includes/specials/SpecialMergeHistory.php
+++ b/includes/specials/SpecialMergeHistory.php
@@ -96,8 +96,10 @@ class MergehistoryForm {
wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
);
}
-
- // TODO: warn about target = dest?
+
+ if ( $this->mTargetObj->equals( $this->mDestObj ) ) {
+ $errors[] = wfMsgExt( 'mergehistory-same-destination', array( 'parse' ) );
+ }
if ( count( $errors ) ) {
$this->showMergeForm();
@@ -113,7 +115,7 @@ class MergehistoryForm {
$wgOut->addWikiMsg( 'mergehistory-header' );
- $wgOut->addHtml(
+ $wgOut->addHTML(
Xml::openElement( 'form', array(
'method' => 'get',
'action' => $wgScript ) ) .
@@ -156,7 +158,7 @@ class MergehistoryForm {
$action = $titleObj->getLocalURL( "action=submit" );
# Start the form here
$top = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'merge' ) );
- $wgOut->addHtml( $top );
+ $wgOut->addHTML( $top );
if( $haveRevisions ) {
# Format the user-visible controls (comment field, submission button)
@@ -188,7 +190,7 @@ class MergehistoryForm {
Xml::closeElement( 'table' ) .
Xml::closeElement( 'fieldset' );
- $wgOut->addHtml( $table );
+ $wgOut->addHTML( $table );
}
$wgOut->addHTML( "<h2 id=\"mw-mergehistory\">" . wfMsgHtml( "mergehistory-list" ) . "</h2>\n" );
@@ -215,7 +217,7 @@ class MergehistoryForm {
$misc .= Xml::hidden( 'dest', $this->mDest );
$misc .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
$misc .= Xml::closeElement( 'form' );
- $wgOut->addHtml( $misc );
+ $wgOut->addHTML( $misc );
return true;
}
@@ -229,7 +231,7 @@ class MergehistoryForm {
$last = $this->message['last'];
$ts = wfTimestamp( TS_MW, $row->rev_timestamp );
- $checkBox = wfRadio( "mergepoint", $ts, false );
+ $checkBox = Xml::radio( "mergepoint", $ts, false );
$pageLink = $this->sk->makeKnownLinkObj( $rev->getTitle(),
htmlspecialchars( $wgLang->timeanddate( $ts ) ), 'oldid=' . $rev->getId() );
@@ -370,7 +372,7 @@ class MergehistoryForm {
$log->addEntry( 'merge', $targetTitle, $this->mComment,
array($destTitle->getPrefixedText(),$TimestampLimit) );
- $wgOut->addHtml( wfMsgExt( 'mergehistory-success', array('parseinline'),
+ $wgOut->addHTML( wfMsgExt( 'mergehistory-success', array('parseinline'),
$targetTitle->getPrefixedText(), $destTitle->getPrefixedText(), $count ) );
wfRunHooks( 'ArticleMergeComplete', array( $targetTitle, $destTitle ) );
@@ -432,10 +434,10 @@ class MergeHistoryPager extends ReverseChronologicalPager {
function getQueryInfo() {
$conds = $this->mConds;
$conds['rev_page'] = $this->articleID;
+ $conds[] = 'page_id = rev_page';
$conds[] = "rev_timestamp < {$this->maxTimestamp}";
-
return array(
- 'tables' => array('revision'),
+ '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' ),
'conds' => $conds