Merge "Don't fallback from uk to ru"
[lhc/web/wiklou.git] / includes / specials / SpecialShortpages.php
index 20f2fc8..a78b082 100644 (file)
@@ -71,19 +71,7 @@ class ShortPagesPage extends QueryPage {
         * @param ResultWrapper $res
         */
        function preprocessResults( $db, $res ) {
-               # There's no point doing a batch check if we aren't caching results;
-               # the page must exist for it to have been pulled out of the table
-               if ( !$this->isCached() || !$res->numRows() ) {
-                       return;
-               }
-
-               $batch = new LinkBatch();
-               foreach ( $res as $row ) {
-                       $batch->add( $row->namespace, $row->title );
-               }
-               $batch->execute();
-
-               $res->seek( 0 );
+               $this->executeLBFromResultWrapper( $res );
        }
 
        function sortDescending() {
@@ -104,19 +92,20 @@ class ShortPagesPage extends QueryPage {
                                Linker::getInvalidTitleDescription( $this->getContext(), $result->namespace, $result->title ) );
                }
 
-               $hlink = Linker::linkKnown(
+               $linkRenderer = $this->getLinkRenderer();
+               $hlink = $linkRenderer->makeKnownLink(
                        $title,
-                       $this->msg( 'hist' )->escaped(),
+                       $this->msg( 'hist' )->text(),
                        [],
                        [ 'action' => 'history' ]
                );
                $hlinkInParentheses = $this->msg( 'parentheses' )->rawParams( $hlink )->escaped();
 
                if ( $this->isCached() ) {
-                       $plink = Linker::link( $title );
+                       $plink = $linkRenderer->makeLink( $title );
                        $exists = $title->exists();
                } else {
-                       $plink = Linker::linkKnown( $title );
+                       $plink = $linkRenderer->makeKnownLink( $title );
                        $exists = true;
                }