From 891093a9b9683215ddf76d7c5dc101d5f327d91c Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 28 Aug 2008 07:14:33 +0000 Subject: [PATCH] * (bug 15172) 'Go' button of Special:Recentchanges now on the same line as the last input element (like Special:Watchlist too) --- RELEASE-NOTES | 2 ++ includes/specials/SpecialRecentchanges.php | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a41e0f88ee..ef73bdfc09 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 670b0db54c..0fe134580f 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -406,15 +406,22 @@ class SpecialRecentChanges extends SpecialPage { $panel[] = '
'; $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; } -- 2.20.1