Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / includes / cache / CacheHelper.php
index fb461b7..e77e251 100644 (file)
@@ -82,6 +82,8 @@ interface ICacheHelper {
        function setExpiry( $cacheExpiry );
 }
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Helper class for caching various elements in a single cache entry.
  *
@@ -217,9 +219,9 @@ class CacheHelper implements ICacheHelper {
                        $subPage = explode( '/', $subPage, 2 );
                        $subPage = count( $subPage ) > 1 ? $subPage[1] : false;
 
-                       $message .= ' ' . Linker::link(
+                       $message .= ' ' . MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
                                $context->getTitle( $subPage ),
-                               $context->msg( 'cachedspecial-refresh-now' )->escaped(),
+                               $context->msg( 'cachedspecial-refresh-now' )->text(),
                                [],
                                $refreshArgs
                        );
@@ -271,7 +273,7 @@ class CacheHelper implements ICacheHelper {
                                $itemKey = array_keys( array_slice( $this->cachedChunks, 0, 1 ) );
                                $itemKey = array_shift( $itemKey );
 
-                               if ( !is_integer( $itemKey ) ) {
+                               if ( !is_int( $itemKey ) ) {
                                        wfWarn( "Attempted to get item with non-numeric key while " .
                                                "the next item in the queue has a key ($itemKey) in " . __METHOD__ );
                                } elseif ( is_null( $itemKey ) ) {