/** @var Collation */
public $collation;
- /** @var ImageGallery */
+ /** @var ImageGalleryBase */
public $gallery;
/** @var Category Category object for this page. */
private function pagingLinks( $first, $last, $type = '' ) {
$prevLink = $this->msg( 'prev-page' )->text();
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
if ( $first != '' ) {
$prevQuery = $this->query;
$prevQuery["{$type}until"] = $first;
unset( $prevQuery["{$type}from"] );
- $prevLink = Linker::linkKnown(
+ $prevLink = $linkRenderer->makeKnownLink(
$this->addFragmentToTitle( $this->title, $type ),
$prevLink,
[],
$lastQuery = $this->query;
$lastQuery["{$type}from"] = $last;
unset( $lastQuery["{$type}until"] );
- $nextLink = Linker::linkKnown(
+ $nextLink = $linkRenderer->makeKnownLink(
$this->addFragmentToTitle( $this->title, $type ),
$nextLink,
[],
// to refresh the incorrect category table entry -- which should be
// quick due to the small number of entries.
$totalcnt = $rescnt;
- $category = $this->cat;
- DeferredUpdates::addCallableUpdate( function () use ( $category ) {
- $category->refreshCounts();
- } );
+ DeferredUpdates::addCallableUpdate( [ $this->cat, 'refreshCounts' ] );
} else {
// Case 3: hopeless. Don't give a total count at all.
// Messages: category-subcat-count-limited, category-article-count-limited,