);
# Add the results to the link cache
- $lb->addResultToCache( LinkCache::singleton(), $res );
+ $linkCache = MediaWikiServices::getInstance()->getLinkCache();
+ $lb->addResultToCache( $linkCache, $res );
return $res;
}
}
if ( $this->CSPNonce === null ) {
// XXX It might be expensive to generate randomness
- // on every request, on windows.
- $rand = MWCryptRand::generate( 15 );
+ // on every request, on Windows.
+ $rand = random_bytes( 15 );
$this->CSPNonce = base64_encode( $rand );
}
return $this->CSPNonce;