Remove unused CSS styles from Parsoid's stylesheet
[mediawiki.git] / load.php
blob25aa1e9005261e4d3bc7864ca3ebd42fba0f349d
1 <?php
2 /**
3 * The web entry point for ResourceLoader. It serves static CSS and JavaScript
4 * assets for web browsers.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * http://www.gnu.org/copyleft/gpl.html
21 * @file
22 * @ingroup entrypoint
23 * @ingroup ResourceLoader
24 * @author Roan Kattouw
25 * @author Trevor Parscal
28 use MediaWiki\MediaWikiServices;
30 // This endpoint is supposed to be independent of request cookies and other
31 // details of the session. Enforce this constraint with respect to session use.
32 define( 'MW_NO_SESSION', 1 );
34 define( 'MW_ENTRY_POINT', 'load' );
36 require __DIR__ . '/includes/WebStart.php';
38 // Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
39 // writes when getting database connections for ResourceLoader. (T192611)
40 MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection();
42 $resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
43 $context = new ResourceLoaderContext( $resourceLoader, $wgRequest );
45 // Respond to ResourceLoader request
46 $resourceLoader->respond( $context );
48 Profiler::instance()->setAllowOutput();
50 $mediawiki = new MediaWiki();
51 $mediawiki->doPostOutputShutdown();