Merge "Added Id to the input box"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Mar 2019 21:49:56 +0000 (21:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Mar 2019 21:49:56 +0000 (21:49 +0000)
1  2 
includes/specials/SpecialContributions.php

@@@ -21,6 -21,7 +21,6 @@@
   * @ingroup SpecialPage
   */
  
 -use MediaWiki\MediaWikiServices;
  use MediaWiki\Widget\DateInputWidget;
  
  /**
@@@ -41,7 -42,6 +41,7 @@@ class SpecialContributions extends Incl
                $out = $this->getOutput();
                // Modules required for viewing the list of contributions (also when included on other pages)
                $out->addModuleStyles( [
 +                      'mediawiki.interface.helpers.styles',
                        'mediawiki.special',
                        'mediawiki.special.changeslist',
                ] );
                }
                $this->opts = ContribsPager::processDateFilter( $this->opts );
  
 +              if ( $this->opts['namespace'] < NS_MAIN ) {
 +                      $this->getOutput()->wrapWikiMsg(
 +                              "<div class=\"mw-negative-namespace-not-supported error\">\n\$1\n</div>",
 +                              [ 'negative-namespace-not-supported' ]
 +                      );
 +                      $out->addHTML( $this->getForm() );
 +                      return;
 +              }
 +
                $feedType = $request->getVal( 'feed' );
  
                $feedParams = [
                                $out->addWikiMsg( 'nocontribs', $target );
                        } else {
                                # Show a message about replica DB lag, if applicable
 -                              $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
 -                              $lag = $lb->safeGetLag( $pager->getDatabase() );
 +                              $lag = $pager->getDatabase()->getSessionLagStatus()['lag'];
                                if ( $lag > 0 ) {
                                        $out->showLagWarning( $lag );
                                }
                        $this->opts['target'],
                        'text',
                        [
+                               'id' => 'mw-target-user-or-ip',
                                'size' => '40',
                                'class' => [
                                        'mw-input',