summaryrefslogtreecommitdiff
path: root/includes/filerepo/ForeignAPIFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/filerepo/ForeignAPIFile.php')
-rw-r--r--includes/filerepo/ForeignAPIFile.php11
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() );