* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the last...
authorRaimond Spekking <raymond@users.mediawiki.org>
Thu, 28 Aug 2008 07:14:33 +0000 (07:14 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Thu, 28 Aug 2008 07:14:33 +0000 (07:14 +0000)
RELEASE-NOTES
includes/specials/SpecialRecentchanges.php

index a41e0f8..ef73bdf 100644 (file)
@@ -154,6 +154,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   literally; now converting them to spaces per expectation.
 * (bug 15342) "Invert" checkbox now works correctly when selecting main
   namespace in Special:Watchlist
+* (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the
+  last input element (like Special:Watchlist too)
 
 
 === API changes in 1.14 ===
index 670b0db..0fe1345 100644 (file)
@@ -406,15 +406,22 @@ class SpecialRecentChanges extends SpecialPage {
                $panel[] = '<hr />';
 
                $extraOpts = $this->getExtraOptions( $opts );
+               $extraOptsCount = count( $extraOpts );
+               $count = 0;
+               $submit = ' ' . Xml::submitbutton( wfMsg( 'allpagessubmit' ) );
 
-               $out = Xml::openElement( 'table' );
+               $out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
                foreach ( $extraOpts as $optionRow ) {
+                       # Add submit button to the last row only
+                       ++$count;
+                       $addSubmit = $count === $extraOptsCount ? $submit : '';
+
                        $out .= Xml::openElement( 'tr' );
-                       if ( is_array($optionRow) ) {
-                               $out .= Xml::tags( 'td', null, $optionRow[0] );
-                               $out .= Xml::tags( 'td', null, $optionRow[1] );
+                       if ( is_array( $optionRow ) ) {
+                               $out .= Xml::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
+                               $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
                        } else {
-                               $out .= Xml::tags( 'td', array( 'colspan' => 2 ), $optionRow );
+                               $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
                        }
                        $out .= Xml::closeElement( 'tr' );
                }
@@ -454,7 +461,6 @@ class SpecialRecentChanges extends SpecialPage {
                }
 
                wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
-               $extraOpts['submit'] = Xml::submitbutton( wfMsg('allpagessubmit') );
                return $extraOpts;
        }