Merge "tests: Remove unused TableCleanupTest class"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index f0a5aa6..b1908c2 100644 (file)
@@ -465,7 +465,8 @@ class SpecialContributions extends IncludableSpecialPage {
                        'month',
                        'topOnly',
                        'newOnly',
-                       'associated'
+                       'associated',
+                       'tagfilter'
                );
 
                foreach ( $this->opts as $name => $value ) {
@@ -481,7 +482,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        $filterSelection = Html::rawElement(
                                'td',
                                array(),
-                               array_shift( $tagFilter ) . implode( '&#160', $tagFilter )
+                               implode( '&#160', $tagFilter )
                        );
                } else {
                        $filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );
@@ -517,8 +518,13 @@ class SpecialContributions extends IncludableSpecialPage {
                                        'mw-ui-input-inline',
                                        'mw-autocomplete-user', // used by mediawiki.userSuggest
                                ),
-                       ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) )
+                       ) + (
+                               // Only autofocus if target hasn't been specified or in non-newbies mode
+                               ( $this->opts['contribs'] === 'newbie' || $this->opts['target'] )
+                                       ? array() : array( 'autofocus' => true )
+                               )
                );
+
                $targetSelection = Html::rawElement(
                        'td',
                        array( 'colspan' => 2 ),
@@ -543,7 +549,7 @@ class SpecialContributions extends IncludableSpecialPage {
                        ) . ' ' .
                                Html::rawElement(
                                        'span',
-                                       array( 'style' => 'white-space: nowrap' ),
+                                       array( 'class' => 'mw-input-with-label' ),
                                        Xml::checkLabel(
                                                $this->msg( 'invert' )->text(),
                                                'nsInvert',
@@ -555,7 +561,7 @@ class SpecialContributions extends IncludableSpecialPage {
                                                )
                                        ) . ' '
                                ) .
-                               Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),
+                               Html::rawElement( 'span', array( 'class' => 'mw-input-with-label' ),
                                        Xml::checkLabel(
                                                $this->msg( 'namespace_association' )->text(),
                                                'associated',
@@ -572,7 +578,7 @@ class SpecialContributions extends IncludableSpecialPage {
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
                        $deletedOnlyCheck = Html::rawElement(
                                'span',
-                               array( 'style' => 'white-space: nowrap' ),
+                               array( 'class' => 'mw-input-with-label' ),
                                Xml::checkLabel(
                                        $this->msg( 'history-show-deleted' )->text(),
                                        'deletedOnly',
@@ -587,7 +593,7 @@ class SpecialContributions extends IncludableSpecialPage {
 
                $checkLabelTopOnly = Html::rawElement(
                        'span',
-                       array( 'style' => 'white-space: nowrap' ),
+                       array( 'class' => 'mw-input-with-label' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-toponly' )->text(),
                                'topOnly',
@@ -598,7 +604,7 @@ class SpecialContributions extends IncludableSpecialPage {
                );
                $checkLabelNewOnly = Html::rawElement(
                        'span',
-                       array( 'style' => 'white-space: nowrap' ),
+                       array( 'class' => 'mw-input-with-label' ),
                        Xml::checkLabel(
                                $this->msg( 'sp-contributions-newonly' )->text(),
                                'newOnly',