* Storage paths are passed in for several cases in File::transform().
Change-Id: I61a4058b80a37f36b78e2dfe62ffdf6f73e6f41e
// XXX: Pass in the storage path even though we are not rendering anything
// and the path is supposed to be an FS path. This is due to getScalerType()
// getting called on the path and clobbering $thumb->getUrl() if it's false.
- $thumb = $handler->getTransform(
- $this, $thumbPath, $thumbUrl, $params );
+ $thumb = $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
$thumb->setStoragePath( $thumbPath );
break;
}
if ( $this->isError() ) {
return false;
} elseif ( $this->path === null ) {
- return $this->file->getLocalRefPath();
+ return $this->file->getLocalRefPath(); // assume thumb was not scaled
+ } elseif ( FileBackend::isStoragePath( $this->path ) ) {
+ $be = $this->file->getRepo()->getBackend();
+ // The temp file will be process cached by FileBackend
+ $fsFile = $be->getLocalReference( array( 'src' => $this->path ) );
+ return $fsFile ? $fsFile->getPath() : false;
} else {
return $this->path; // may return false
}