Bug 23747. Move the "Compare revisions" button before the RevDel and RevMove buttons.
authorDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 12 Jun 2010 14:59:16 +0000 (14:59 +0000)
committerDerk-Jan Hartman <hartman@users.mediawiki.org>
Sat, 12 Jun 2010 14:59:16 +0000 (14:59 +0000)
All three are submit buttons, and the first will be used as the default action.

RELEASE-NOTES
includes/HistoryPage.php

index 73ce0bd..50312b3 100644 (file)
@@ -190,6 +190,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 23688) Correct mime types for Office 2007 OpenXML documents.
 * (bug 23787) Corrected $wgDefaultSkin's comment in DefaultSettings.php
 * (bug 23797) Xml::input() now allows '0' for the value parameter
+* (bug 23747) Make sure that on History pages, the RevDel button is not
+  accidently activated when hitting enter.
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index a9e13b4..cbf473d 100644 (file)
@@ -381,6 +381,13 @@ class HistoryPager extends ReverseChronologicalPager {
                $s .= Xml::hidden( 'action', 'historysubmit' ) . "\n";
 
                $this->buttons = '<div>';
+               $this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions'),
+                       array(
+                               'class'     => 'historysubmit',
+                               'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
+                               'title'     => wfMsg( 'tooltip-compareselectedversions' ),
+                       )
+               ) . "\n";
                if( $wgUser->isAllowed('deleterevision') ) {
                        $float = $wgContLang->alignEnd();
                        # Note bug #20966, <button> is non-standard in IE<8
@@ -409,13 +416,6 @@ class HistoryPager extends ReverseChronologicalPager {
                                wfMsg( 'revisionmoveselectedversions' )
                        ) . "\n";
                }
-               $this->buttons .= $this->submitButton( wfMsg( 'compareselectedversions'),
-                       array(
-                               'class'     => 'historysubmit',
-                               'accesskey' => wfMsg( 'accesskey-compareselectedversions' ),
-                               'title'     => wfMsg( 'tooltip-compareselectedversions' ),
-                       )
-               ) . "\n";
                $this->buttons .= '</div>';
                $s .= $this->buttons . '<ul id="pagehistory">' . "\n";
                return $s;