* @return string HTML output
*/
public function getHTML() {
-
$this->showGallery = $this->getConfig()->get( 'CategoryMagicGallery' )
&& !$this->getOutput()->mNoGallery;
* @return string HTML
*/
private function pagingLinks( $first, $last, $type = '' ) {
- $prevLink = $this->msg( 'prev-page' )->text();
+ $prevLink = $this->msg( 'prev-page' )->escaped();
$linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
if ( $first != '' ) {
unset( $prevQuery["{$type}from"] );
$prevLink = $linkRenderer->makeKnownLink(
$this->addFragmentToTitle( $this->title, $type ),
- $prevLink,
+ new HtmlArmor( $prevLink ),
[],
$prevQuery
);
}
- $nextLink = $this->msg( 'next-page' )->text();
+ $nextLink = $this->msg( 'next-page' )->escaped();
if ( $last != '' ) {
$lastQuery = $this->query;
unset( $lastQuery["{$type}until"] );
$nextLink = $linkRenderer->makeKnownLink(
$this->addFragmentToTitle( $this->title, $type ),
- $nextLink,
+ new HtmlArmor( $nextLink ),
[],
$lastQuery
);
// 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 ) {
- # Avoid excess contention on the same category (T162121)
- $dbw = wfGetDB( DB_MASTER );
- $name = __METHOD__ . ':' . md5( $this->mName );
- $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 1 );
- if ( $scopedLock ) {
- $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,