X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FForeignAPIFile.php;h=fd3dc8bba6d0db0a867f1d2ebc9a26bcb145e421;hp=0e48195c6ee6a75b5733dd4f762d650e48eac7cd;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hpb=485f66f1744fea056e20a5bef619989bf1749202 diff --git a/includes/filerepo/file/ForeignAPIFile.php b/includes/filerepo/file/ForeignAPIFile.php index 0e48195c6e..fd3dc8bba6 100644 --- a/includes/filerepo/file/ForeignAPIFile.php +++ b/includes/filerepo/file/ForeignAPIFile.php @@ -355,12 +355,12 @@ class ForeignAPIFile extends File { } function purgeDescriptionPage() { - global $wgContLang; - - $url = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() ); + $services = MediaWikiServices::getInstance(); + $url = $this->repo->getDescriptionRenderUrl( + $this->getName(), $services->getContentLanguage()->getCode() ); $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5( $url ) ); - MediaWikiServices::getInstance()->getMainWANObjectCache()->delete( $key ); + $services->getMainWANObjectCache()->delete( $key ); } /**