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