fixing bug 17395
authorTobias <churchofemacs@users.mediawiki.org>
Sun, 2 Aug 2009 15:22:06 +0000 (15:22 +0000)
committerTobias <churchofemacs@users.mediawiki.org>
Sun, 2 Aug 2009 15:22:06 +0000 (15:22 +0000)
RELEASE-NOTES
includes/filerepo/File.php

index b5341dd..3677fcf 100644 (file)
@@ -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 ==
 
index c790b3b..f8d7f8a 100644 (file)
@@ -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) {