Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -113,6 +113,10 @@ |
114 | 114 | function getThumbUrlFromCache( $name, $width, $height ) { |
115 | 115 | global $wgMemc, $wgUploadPath, $wgServer, $wgUploadDirectory; |
116 | 116 | |
| 117 | + if ( !$this->canCacheThumbs() ) { |
| 118 | + return $this->getThumbUrl(); |
| 119 | + } |
| 120 | + |
117 | 121 | $key = wfMemcKey( 'ForeignAPIRepo', 'ThumbUrl', $name ); |
118 | 122 | if ( $thumbUrl = $wgMemc->get($key) ) { |
119 | 123 | wfDebug("Got thumb from local cache. $thumbUrl \n"); |
Index: trunk/phase3/includes/filerepo/ForeignAPIFile.php |
— | — | @@ -31,17 +31,10 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | function transform( $params, $flags = 0 ) { |
35 | | - if ( $this->repo->canCacheThumbs() ) { |
36 | | - $thumbUrl = $this->repo->getThumbUrlFromCache( |
| 35 | + $thumbUrl = $this->repo->getThumbUrlFromCache( |
37 | 36 | $this->getName(), |
38 | 37 | isset( $params['width'] ) ? $params['width'] : -1, |
39 | 38 | isset( $params['height'] ) ? $params['height'] : -1 ); |
40 | | - } else { |
41 | | - $thumbUrl = $this->repo->getThumbUrl( |
42 | | - $this->getName(), |
43 | | - isset( $params['width'] ) ? $params['width'] : -1, |
44 | | - isset( $params['height'] ) ? $params['height'] : -1 ); |
45 | | - } |
46 | 39 | if( $thumbUrl ) { |
47 | 40 | return $this->handler->getTransform( $this, 'bogus', $thumbUrl, $params );; |
48 | 41 | } |