From 4e5d3924949673ada76111d2ec9209c5d06b5ec3 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 2 Aug 2009 15:22:06 +0000 Subject: [PATCH] fixing bug 17395 --- RELEASE-NOTES | 3 +++ includes/filerepo/File.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b5341dd6ab..3677fcfb79 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -363,6 +363,9 @@ this. Was used when mwEmbed was going to be an extension. "editusercssjs" into "editusercss" and edituserjs" respectively. * (bug 19394) RecentChanges feed URLs for log items with no revisions (eg Newuser, Userrights) are no longer broken +* (bug 17395) Remote file descriptions use user language ($wgLang), not wiki + language ($wgContLang) + == API changes in 1.16 == diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index c790b3be16..f8d7f8a655 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -1064,15 +1064,15 @@ abstract class File { * Get the HTML text of the description page, if available */ function getDescriptionText() { - global $wgMemc, $wgContLang; + global $wgMemc, $wgLang; if ( !$this->repo->fetchDescription ) { return false; } - $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() ); + $renderUrl = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgLang->getCode() ); if ( $renderUrl ) { if ( $this->repo->descriptionCacheExpiry > 0 ) { wfDebug("Attempting to get the description from cache..."); - $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgContLang->getCode(), + $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgLang->getCode(), $this->getName() ); $obj = $wgMemc->get($key); if ($obj) { -- 2.20.1