* @param Language|null $lang Optional language to fetch description in.
* @return string|false
*/
- function getDescriptionText( $lang = null ) {
+ function getDescriptionText( Language $lang = null ) {
global $wgLang;
if ( !$this->repo->fetchDescription ) {
return false;
}
- $lang = $lang ?: $wgLang;
+ $lang = $lang ?? $wgLang;
$renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $lang->getCode() );
if ( !$renderUrl ) {
return false;
return $cache->getWithSetCallback(
$this->repo->getLocalCacheKey(
- 'RemoteFileDescription',
- 'url',
+ 'ForeignFileDescription',
$lang->getCode(),
- $this->getName(),
+ md5( $this->getName() ),
$touched
),
$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,