Merge "tests: Remove unused TableCleanupTest class"
[lhc/web/wiklou.git] / includes / specials / SpecialContributions.php
index 81668e1..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 ),