fixing bug 17395

This commit is contained in:
Tobias 2009-08-02 15:22:06 +00:00
parent cdf475e5ad
commit 4e5d392494
2 changed files with 6 additions and 3 deletions

View 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 ==

View 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) {