ParserOutput: ensure all created ParserOutputs have a "start of parse" time set
[mediawiki.git] / thumb_handler.php
bloba37247175a043e63dc5bb3cadc5fa5621b26aa60
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 * @see thumb.php
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 * http://www.gnu.org/copyleft/gpl.html
28 * @file
29 * @ingroup entrypoint
30 * @ingroup Media
33 use MediaWiki\Context\RequestContext;
34 use MediaWiki\EntryPointEnvironment;
35 use MediaWiki\FileRepo\Thumbnail404EntryPoint;
36 use MediaWiki\MediaWikiServices;
38 define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
39 define( 'MW_ENTRY_POINT', 'thumb_handler' );
41 require __DIR__ . '/includes/WebStart.php';
43 ( new Thumbnail404EntryPoint(
44 RequestContext::getMain(),
45 new EntryPointEnvironment(),
46 MediaWikiServices::getInstance()
47 ) )->run();