diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 11:52:48 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-07-28 11:52:48 +0200 |
commit | 222b01f5169f1c7e69762e0e8904c24f78f71882 (patch) | |
tree | 8e932e12546bb991357ec48eb1638d1770be7a35 /includes/filerepo/ForeignAPIFile.php | |
parent | 00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff) |
update to MediaWiki 1.16.0
Diffstat (limited to 'includes/filerepo/ForeignAPIFile.php')
-rw-r--r-- | includes/filerepo/ForeignAPIFile.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/filerepo/ForeignAPIFile.php b/includes/filerepo/ForeignAPIFile.php index 03498fb1..c46b1f8f 100644 --- a/includes/filerepo/ForeignAPIFile.php +++ b/includes/filerepo/ForeignAPIFile.php @@ -43,10 +43,7 @@ class ForeignAPIFile extends File { $this->getName(), isset( $params['width'] ) ? $params['width'] : -1, isset( $params['height'] ) ? $params['height'] : -1 ); - if( $thumbUrl ) { - return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );; - } - return false; + return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );; } // Info we can get from API... @@ -108,7 +105,7 @@ class ForeignAPIFile extends File { return $this->mInfo['mime']; } - /// @fixme May guess wrong on file types that can be eg audio or video + /// @todo Fixme: may guess wrong on file types that can be eg audio or video function getMediaType() { $magic = MimeMagic::singleton(); return $magic->getMediaType( null, $this->getMimeType() ); @@ -162,13 +159,13 @@ class ForeignAPIFile extends File { function purgeDescriptionPage() { global $wgMemc, $wgContLang; $url = $this->repo->getDescriptionRenderUrl( $this->getName(), $wgContLang->getCode() ); - $key = wfMemcKey( 'RemoteFileDescription', 'url', md5($url) ); + $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', md5($url) ); $wgMemc->delete( $key ); } function purgeThumbnails() { global $wgMemc; - $key = wfMemcKey( 'ForeignAPIRepo', 'ThumbUrl', $this->getName() ); + $key = $this->repo->getLocalCacheKey( 'ForeignAPIRepo', 'ThumbUrl', $this->getName() ); $wgMemc->delete( $key ); $files = $this->getThumbnails(); $dir = $this->getThumbPath( $this->getName() ); |