Index: trunk/phase3/includes/specials/SpecialFilepath.php |
— | — | @@ -47,15 +47,18 @@ |
48 | 48 | } else { |
49 | 49 | $file = wfFindFile( $title ); |
50 | 50 | if ( $file && $file->exists() ) { |
51 | | - $url = $file->getURL(); |
52 | 51 | $width = $wgRequest->getInt( 'width', -1 ); |
53 | 52 | $height = $wgRequest->getInt( 'height', -1 ); |
| 53 | + |
54 | 54 | if ( $width != -1 ) { |
55 | 55 | $mto = $file->transform( array( 'width' => $width, 'height' => $height ) ); |
56 | 56 | if ( $mto && !$mto->isError() ) { |
57 | 57 | $url = $mto->getURL(); |
58 | 58 | } |
| 59 | + } else { |
| 60 | + $url = $file->getURL(); |
59 | 61 | } |
| 62 | + |
60 | 63 | $wgOut->redirect( $url ); |
61 | 64 | } else { |
62 | 65 | $wgOut->setStatusCode( 404 ); |