Index: branches/wmf/1.16wmf4/includes/specials/SpecialFilepath.php |
— | — | @@ -17,7 +17,16 @@ |
18 | 18 | } else { |
19 | 19 | $file = wfFindFile( $title ); |
20 | 20 | if ( $file && $file->exists() ) { |
21 | | - $wgOut->redirect( $file->getURL() ); |
| 21 | + $url = $file->getURL(); |
| 22 | + $width = $wgRequest->getInt( 'width', -1 ); |
| 23 | + $height = $wgRequest->getInt( 'height', -1 ); |
| 24 | + if ( $width != -1 ) { |
| 25 | + $mto = $file->transform( array( 'width' => $width, 'height' => $height ) ); |
| 26 | + if ( $mto && !$mto->isError() ) { |
| 27 | + $url = $mto->getURL(); |
| 28 | + } |
| 29 | + } |
| 30 | + $wgOut->redirect( $url ); |
22 | 31 | } else { |
23 | 32 | $wgOut->setStatusCode( 404 ); |
24 | 33 | $cform = new FilepathForm( $title ); |
Property changes on: branches/wmf/1.16wmf4/includes/specials/SpecialFilepath.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
25 | 34 | Merged /branches/sqlite/includes/specials/SpecialFilepath.php:r58211-58321 |
26 | 35 | Merged /trunk/phase3/includes/specials/SpecialFilepath.php:r63045,63047,63549,63764,63897-63901,64846,64860,64862,71059,71098,77555,77558-77560,77563-77565,77573,79561,80381 |
27 | 36 | Merged /branches/wmf-deployment/includes/specials/SpecialFilepath.php:r53381,56967,60970 |
28 | 37 | Merged /branches/REL1_15/phase3/includes/specials/SpecialFilepath.php:r51646 |
29 | 38 | Merged /branches/REL1_16/phase3/includes/specials/SpecialFilepath.php:r79562 |