X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=thumb.php;h=2bb6065e3e839f712b1cdcb21c8004286d63dcde;hp=13dbc0e767ca3742e3d8d68e288b165abb95edbc;hb=748c5eae2fd5d897c94c48771161c259941a7488;hpb=3ce997ed65303c4f35216e7e7abb02c4718d8239 diff --git a/thumb.php b/thumb.php index 13dbc0e767..2bb6065e3e 100644 --- a/thumb.php +++ b/thumb.php @@ -25,6 +25,11 @@ use MediaWiki\Logger\LoggerFactory; use MediaWiki\MediaWikiServices; define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); +// T241340: thumb.php is included by thumb_handler.php which already defined +// MW_ENTRY_POINT to 'thumb_handler' +if ( !defined( 'MW_ENTRY_POINT' ) ) { + define( 'MW_ENTRY_POINT', 'thumb' ); +} require __DIR__ . '/includes/WebStart.php'; // Don't use fancy MIME detection, just check the file extension for jpg/gif/png @@ -35,7 +40,7 @@ if ( defined( 'THUMB_HANDLER' ) ) { wfThumbHandle404(); } else { // Called directly, use $_GET params - wfStreamThumb( $wgRequest->getQueryValues() ); + wfStreamThumb( $wgRequest->getQueryValuesOnly() ); } $mediawiki = new MediaWiki(); @@ -523,7 +528,7 @@ function wfGenerateThumbnail( File $file, array $params, $thumbName, $thumbPath * /w/images/thumb/a/ab/Foo.png/120px-Foo.png. The $thumbRel parameter * of this function would be set to "a/ab/Foo.png/120px-Foo.png". * This method is responsible for turning that into an array - * with the folowing keys: + * with the following keys: * * f => the filename (Foo.png) * * rel404 => the whole thing (a/ab/Foo.png/120px-Foo.png) * * archived => 1 (If the request is for an archived thumb)