Index: trunk/phase3/thumb.php |
— | — | @@ -49,7 +49,14 @@ |
50 | 50 | |
51 | 51 | // Actually fetch the image. Method depends on whether it is archived or not. |
52 | 52 | if( $isOld ) { |
53 | | - $img = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $fileName ); |
| 53 | + // Format is <timestamp>!<name> |
| 54 | + $bits = explode( '!', $fileName, 2 ); |
| 55 | + if( !isset($bits[1]) ) { |
| 56 | + wfThumbError( 404, wfMsg( 'badtitletext' ) ); |
| 57 | + return; |
| 58 | + } |
| 59 | + $title = Title::makeTitle( NS_IMAGE, $bits[1] ); |
| 60 | + $img = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $fileName ); |
54 | 61 | } else { |
55 | 62 | $img = wfLocalFile( $fileName ); |
56 | 63 | } |