- } elseif ( $isTemp ) {
- $repo = RepoGroup::singleton()->getLocalRepo()->getTempRepo();
- // Format is <timestamp>!<name> or just <name>
- $bits = explode( '!', $fileName, 2 );
- // Get the name without the timestamp so hash paths are correctly computed
- $title = Title::makeTitleSafe( NS_FILE, isset( $bits[1] ) ? $bits[1] : $fileName );
- if ( !$title ) {
- wfThumbError( 404, wfMessage( 'badtitletext' )->text() );
- wfProfileOut( __METHOD__ );
- return;
- }
- $img = new UnregisteredLocalFile( $title, $repo,
- $repo->getZonePath( 'public' ) . '/' . $repo->getTempHashPath( $fileName ) . $fileName
- );