dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
9e89e3d
)
Merge "[FileRepo] Avoid performance degeration due to thumbnail requests with a read...
author
Brion VIBBER
<brion@wikimedia.org>
Wed, 25 Apr 2012 19:28:00 +0000
(19:28 +0000)
committer
Gerrit Code Review
<gerrit@wikimedia.org>
Wed, 25 Apr 2012 19:28:00 +0000
(19:28 +0000)
includes/filerepo/file/File.php
patch
|
blob
|
history
diff --git
a/includes/filerepo/file/File.php
b/includes/filerepo/file/File.php
index
ae11e67
..
461c255
100644
(file)
--- a/
includes/filerepo/file/File.php
+++ b/
includes/filerepo/file/File.php
@@
-842,6
+842,13
@@
abstract class File {
}
}
+ // If the backend is ready-only, don't keep generating thumbnails
+ // only to return transformation errors, just return the error now.
+ if ( $this->repo->getReadOnlyReason() !== false ) {
+ $thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags );
+ break;
+ }
+
// Create a temp FS file with the same extension and the thumbnail
$thumbExt = FileBackend::extensionFromPath( $thumbPath );
$tmpFile = TempFSFile::factory( 'transform_', $thumbExt );