Merge "Mark protected IndexPager properties also as protected in subclasses"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 21 Dec 2018 23:39:16 +0000 (23:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 21 Dec 2018 23:39:16 +0000 (23:39 +0000)
1  2 
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/AllMessagesTablePager.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/NewPagesPager.php
includes/specials/pagers/UsersPager.php

@@@ -414,22 -350,20 +414,22 @@@ class ContribsPager extends RangeChrono
        }
  
        /**
 -       * Override of getIndexField() in IndexPager.
 -       * For IP ranges, it's faster to use the replicated ipc_rev_timestamp
 -       * on the `ip_changes` table than the rev_timestamp on the `revision` table.
 -       * @return string Name of field
 +       * @return string
         */
        public function getIndexField() {
 -              if ( $this->isQueryableRange( $this->target ) ) {
 -                      return 'ipc_rev_timestamp';
 -              } else {
 -                      return 'rev_timestamp';
 -              }
 +              // Note this is run via parent::__construct() *before* $this->target is set!
 +              return 'rev_timestamp';
 +      }
 +
 +      /**
 +       * @return string[]
 +       */
 +      protected function getExtraSortFields() {
 +              // Note this is run via parent::__construct() *before* $this->target is set!
 +              return [ 'rev_id' ];
        }
  
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                # Do a link batch query
                $this->mResult->seek( 0 );
                $parentRevIds = [];