r80383 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80382‎ | r80383 | r80384 >
Date:11:36, 15 January 2011
Author:catrope
Status:ok
Tags:
Comment:
1.16wmf4: MFT r80381
Modified paths:
  • /branches/wmf/1.16wmf4/includes/specials/SpecialFilepath.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/specials/SpecialFilepath.php
@@ -17,7 +17,16 @@
1818 } else {
1919 $file = wfFindFile( $title );
2020 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 );
2231 } else {
2332 $wgOut->setStatusCode( 404 );
2433 $cform = new FilepathForm( $title );
Property changes on: branches/wmf/1.16wmf4/includes/specials/SpecialFilepath.php
___________________________________________________________________
Added: svn:mergeinfo
2534 Merged /branches/sqlite/includes/specials/SpecialFilepath.php:r58211-58321
2635 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
2736 Merged /branches/wmf-deployment/includes/specials/SpecialFilepath.php:r53381,56967,60970
2837 Merged /branches/REL1_15/phase3/includes/specials/SpecialFilepath.php:r51646
2938 Merged /branches/REL1_16/phase3/includes/specials/SpecialFilepath.php:r79562

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80381Add width parameter to Special:Filepath to allow getting the file path of a t...catrope11:20, 15 January 2011

Status & tagging log