https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108185
Revision: 108185 Author: aaron Date: 2012-01-05 23:35:38 +0000 (Thu, 05 Jan 2012) Log Message: ----------- Partially reverted r108111: we can't assume subclasses put thumbnails in the...thumbnails zone. They might override the thumbnail path functions. Modified Paths: -------------- trunk/phase3/includes/filerepo/file/File.php Modified: trunk/phase3/includes/filerepo/file/File.php =================================================================== --- trunk/phase3/includes/filerepo/file/File.php 2012-01-05 23:32:41 UTC (rev 108184) +++ trunk/phase3/includes/filerepo/file/File.php 2012-01-05 23:35:38 UTC (rev 108185) @@ -807,9 +807,12 @@ } } elseif ( $thumb->hasFile() && !$thumb->fileIsSource() ) { // Copy the thumbnail from the file system into storage - $status = $this->repo->store( - $tmpThumbPath, 'thumb', $this->getThumbRel( $thumbName ), - FileRepo::OVERWRITE | FileRepo::SKIP_LOCKING | FileRepo::ALLOW_STALE ); + // We don't use FileRepo::store() because of hacky suclasses + // overriding File::getThumbPath() to use a different zone (e.g. 'temp'). + $status = $this->repo->getBackend()->store( + array( 'src' => $tmpThumbPath, 'dst' => $thumbPath ), + array( 'ignoreErrors' => 1, 'nonLocking' => 1, 'allowStale' => 1 ) + ); if ( $status->isOK() ) { $thumb->setStoragePath( $thumbPath ); } else { _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs