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)
13 files changed:
includes/actions/HistoryAction.php
includes/logging/LogPager.php
includes/pager/TablePager.php
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/AllMessagesTablePager.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/DeletedContribsPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/MergeHistoryPager.php
includes/specials/pagers/NewFilesPager.php
includes/specials/pagers/NewPagesPager.php
includes/specials/pagers/ProtectedTitlesPager.php
includes/specials/pagers/UsersPager.php

index 7d6b548..140ca2e 100644 (file)
@@ -492,7 +492,7 @@ class HistoryPager extends ReverseChronologicalPager {
                return $s;
        }
 
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                if ( !Hooks::run( 'PageHistoryPager::doBatchLookups', [ $this, $this->mResult ] ) ) {
                        return;
                }
@@ -523,7 +523,7 @@ class HistoryPager extends ReverseChronologicalPager {
         *
         * @return string HTML output
         */
-       function getStartBody() {
+       protected function getStartBody() {
                $this->lastRow = false;
                $this->counter = 1;
                $this->oldIdChecked = 0;
@@ -585,7 +585,7 @@ class HistoryPager extends ReverseChronologicalPager {
                return $element;
        }
 
-       function getEndBody() {
+       protected function getEndBody() {
                if ( $this->lastRow ) {
                        $latest = $this->counter == 1 && $this->mIsFirst;
                        $firstInList = $this->counter == 1;
index e7096c4..b31f165 100644 (file)
@@ -365,7 +365,7 @@ class LogPager extends ReverseChronologicalPager {
                return 'log_timestamp';
        }
 
-       public function getStartBody() {
+       protected function getStartBody() {
                # Do a link batch query
                if ( $this->getNumRows() > 0 ) {
                        $lb = new LinkBatch;
index f38ed27..e99c33b 100644 (file)
@@ -110,7 +110,7 @@ abstract class TablePager extends IndexPager {
         * @protected
         * @return string
         */
-       function getStartBody() {
+       protected function getStartBody() {
                $sortClass = $this->getSortHeaderClass();
 
                $s = '';
@@ -162,7 +162,7 @@ abstract class TablePager extends IndexPager {
         * @protected
         * @return string
         */
-       function getEndBody() {
+       protected function getEndBody() {
                return "</tbody></table>\n";
        }
 
index 506cd3c..50f1d6b 100644 (file)
@@ -136,7 +136,7 @@ class ActiveUsersPager extends UsersPager {
                ];
        }
 
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                parent::doBatchLookups();
 
                $uids = [];
index 8363e56..bde7559 100644 (file)
@@ -276,7 +276,7 @@ class AllMessagesTablePager extends TablePager {
                return $result;
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                $tableClass = $this->getTableClass();
                return Xml::openElement( 'table', [
                        'class' => "mw-datatable $tableClass",
index 59f26a2..ca13f3d 100644 (file)
@@ -429,7 +429,7 @@ class ContribsPager extends RangeChronologicalPager {
                return [ 'rev_id' ];
        }
 
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                # Do a link batch query
                $this->mResult->seek( 0 );
                $parentRevIds = [];
@@ -465,14 +465,14 @@ class ContribsPager extends RangeChronologicalPager {
        /**
         * @return string
         */
-       function getStartBody() {
+       protected function getStartBody() {
                return "<ul class=\"mw-contributions-list\">\n";
        }
 
        /**
         * @return string
         */
-       function getEndBody() {
+       protected function getEndBody() {
                return "</ul>\n";
        }
 
index ee7eb3e..c69a183 100644 (file)
@@ -139,11 +139,11 @@ class DeletedContribsPager extends IndexPager {
                return 'ar_timestamp';
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                return "<ul>\n";
        }
 
-       function getEndBody() {
+       protected function getEndBody() {
                return "</ul>\n";
        }
 
index ab38e1a..a10c32f 100644 (file)
@@ -422,7 +422,7 @@ class ImageListPager extends TablePager {
                }
        }
 
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                $userIds = [];
                $this->mResult->seek( 0 );
                foreach ( $this->mResult as $row ) {
index 6a8f7da..3dbec6a 100644 (file)
@@ -48,7 +48,7 @@ class MergeHistoryPager extends ReverseChronologicalPager {
                parent::__construct( $form->getContext() );
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                # Do a link batch query
                $this->mResult->seek( 0 );
                $batch = new LinkBatch();
index 6b7e4b8..6e16e79 100644 (file)
@@ -168,7 +168,7 @@ class NewFilesPager extends RangeChronologicalPager {
                return 'img_timestamp';
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                if ( !$this->gallery ) {
                        // Note that null for mode is taken to mean use default.
                        $mode = $this->getRequest()->getVal( 'gallerymode', null );
@@ -183,7 +183,7 @@ class NewFilesPager extends RangeChronologicalPager {
                return '';
        }
 
-       function getEndBody() {
+       protected function getEndBody() {
                return $this->gallery->toHTML();
        }
 
index b85bc2f..0c95b7e 100644 (file)
@@ -132,7 +132,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                return $this->mForm->formatRow( $row );
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                # Do a batch existence check on pages
                $linkBatch = new LinkBatch();
                foreach ( $this->mResult as $row ) {
@@ -145,7 +145,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                return '<ul>';
        }
 
-       function getEndBody() {
+       protected function getEndBody() {
                return '</ul>';
        }
 }
index ed437be..d17e3c6 100644 (file)
@@ -37,7 +37,7 @@ class ProtectedTitlesPager extends AlphabeticPager {
                parent::__construct( $form->getContext() );
        }
 
-       function getStartBody() {
+       protected function getStartBody() {
                # Do a link batch query
                $this->mResult->seek( 0 );
                $lb = new LinkBatch;
index fbf179d..391c313 100644 (file)
@@ -225,7 +225,7 @@ class UsersPager extends AlphabeticPager {
                return Html::rawElement( 'li', [], "{$item}{$edits}{$created}{$blocked}" );
        }
 
-       function doBatchLookups() {
+       protected function doBatchLookups() {
                $batch = new LinkBatch();
                $userIds = [];
                # Give some pointers to make user links