Fix MediaWiki.WhiteSpace.EmptyLinesBetweenUse.Found
[mediawiki.git] / thumb_handler.php
blob2ae895645f29caff92cb02d5d0c904aebbab1644
1 <?php
2 /**
3 * The web entry point to be used as 404 handler behind a web server rewrite
4 * rule for media thumbnails, internally handled via thumb.php.
6 * This script will interpret a request URL like
7 * `/w/images/thumb/a/a9/Example.jpg/50px-Example.jpg` and treat it as
8 * if it was a request to thumb.php with the relevant query parameters filled
9 * out. See also $wgGenerateThumbnailOnParse.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 * http://www.gnu.org/copyleft/gpl.html
26 * @file
27 * @ingroup entrypoint
28 * @ingroup Media
31 define( 'THUMB_HANDLER', true );
32 define( 'MW_ENTRY_POINT', 'thumb_handler' );
34 // Execute thumb.php, having set THUMB_HANDLER so that
35 // it knows to extract params from a thumbnail file URL.
36 require __DIR__ . '/thumb.php';