Merge "build: Update Karma's qunit from 2.5.0 to 2.6.0"
[lhc/web/wiklou.git] / includes / CategoryViewer.php
index 9d692d7..4202249 100644 (file)
@@ -629,7 +629,7 @@ class CategoryViewer extends ContextSource {
         * @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 != '' ) {
@@ -638,13 +638,13 @@ class CategoryViewer extends ContextSource {
                        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;
@@ -652,7 +652,7 @@ class CategoryViewer extends ContextSource {
                        unset( $lastQuery["{$type}until"] );
                        $nextLink = $linkRenderer->makeKnownLink(
                                $this->addFragmentToTitle( $this->title, $type ),
-                               $nextLink,
+                               new HtmlArmor( $nextLink ),
                                [],
                                $lastQuery
                        );
@@ -735,11 +735,7 @@ class CategoryViewer extends ContextSource {
                        $totalcnt = $dbcnt;
                } elseif ( $rescnt < $this->limit && !$fromOrUntil ) {
                        // Case 2: not sane, but salvageable.  Use the number of results.
-                       // Since there are fewer than 200, we can also take this opportunity
-                       // to refresh the incorrect category table entry -- which should be
-                       // quick due to the small number of entries.
                        $totalcnt = $rescnt;
-                       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,