r108185 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108184‎ | r108185 | r108186 >
Date:23:35, 5 January 2012
Author:aaron
Status:ok (Comments)
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/file/File.php
@@ -807,9 +807,12 @@
808808 }
809809 } elseif ( $thumb->hasFile() && !$thumb->fileIsSource() ) {
810810 // Copy the thumbnail from the file system into storage
811 - $status = $this->repo->store(
812 - $tmpThumbPath, 'thumb', $this->getThumbRel( $thumbName ),
813 - FileRepo::OVERWRITE | FileRepo::SKIP_LOCKING | FileRepo::ALLOW_STALE );
 811+ // We don't use FileRepo::store() because of hacky suclasses
 812+ // overriding File::getThumbPath() to use a different zone (e.g. 'temp').
 813+ $status = $this->repo->getBackend()->store(
 814+ array( 'src' => $tmpThumbPath, 'dst' => $thumbPath ),
 815+ array( 'ignoreErrors' => 1, 'nonLocking' => 1, 'allowStale' => 1 )
 816+ );
814817 if ( $status->isOK() ) {
815818 $thumb->setStoragePath( $thumbPath );
816819 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r108472Fix r108185: file transform store op needs 'overwriteDest'aaron21:21, 9 January 2012
r109071Follow-up r108185: removed now unused ALLOW_STALE paramaaron22:54, 16 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106978* Added FileRepo::SKIP_LOCKING constant and made storeBatch() check it....aaron20:39, 21 December 2011

Comments

#Comment by Aaron Schulz (talk | contribs)   01:24, 6 January 2012

Commit summary is wrong. This is a partial revert of r106978 instead.

Status & tagging log