X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=thumb.php;h=ad5239e297223dbbc1b451c86b1980e99ef79fa7;hb=4bd886001b743d348a5869faae7831be5c70dc6a;hp=913adc18ecb1140a6a9c79627af2e9e54c70a441;hpb=a443be2747d49938dd7beb2fa08d1aefcf15ed7b;p=lhc%2Fweb%2Fwiklou.git diff --git a/thumb.php b/thumb.php index 913adc18ec..ad5239e297 100644 --- a/thumb.php +++ b/thumb.php @@ -107,6 +107,15 @@ function wfStreamThumb( array $params ) { $fileName = isset( $params['f'] ) ? $params['f'] : ''; + // Backwards compatibility parameters + if ( isset( $params['w'] ) ) { + $params['width'] = $params['w']; + unset( $params['w'] ); + } + if ( isset( $params['p'] ) ) { + $params['page'] = $params['p']; + } + // Is this a thumb of an archived file? $isOld = ( isset( $params['archived'] ) && $params['archived'] ); unset( $params['archived'] ); // handlers don't care @@ -171,7 +180,6 @@ function wfStreamThumb( array $params ) { return; } - // Check the source file storage path if ( !$img->exists() ) { $redirectedLocation = false; @@ -235,18 +243,9 @@ function wfStreamThumb( array $params ) { } } - // Backwards compatibility parameters - if ( isset( $params['w'] ) ) { - $params['width'] = $params['w']; - unset( $params['w'] ); - } - if ( isset( $params['p'] ) ) { - $params['page'] = $params['p']; - } unset( $params['r'] ); // ignore 'r' because we unconditionally pass File::RENDER unset( $params['f'] ); // We're done with 'f' parameter. - // Get the normalized thumbnail name from the parameters... try { $thumbName = $img->thumbName( $params );