X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategoryViewer.php;h=7086a48b776e0f27cc75a622d7ee28911573d7df;hb=7ad35afab2a7d6a289097d6a23b2e00c1728c45a;hp=4c4b8bbc874f54a31936d3457586023ac1410b07;hpb=ce079cf6ad79ca8d3360817f809b219d166f9153;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 4c4b8bbc87..7086a48b77 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -67,7 +67,7 @@ class CategoryViewer extends ContextSource { /** @var Collation */ public $collation; - /** @var ImageGallery */ + /** @var ImageGalleryBase */ public $gallery; /** @var Category Category object for this page. */ @@ -632,11 +632,12 @@ class CategoryViewer extends ContextSource { 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, [], @@ -650,7 +651,7 @@ class CategoryViewer extends ContextSource { $lastQuery = $this->query; $lastQuery["{$type}from"] = $last; unset( $lastQuery["{$type}until"] ); - $nextLink = Linker::linkKnown( + $nextLink = $linkRenderer->makeKnownLink( $this->addFragmentToTitle( $this->title, $type ), $nextLink, [], @@ -739,10 +740,7 @@ class CategoryViewer extends ContextSource { // 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,