Fix various typos
[mediawiki.git] / load.php
bloba64905db04f65430095dce322c7d2317db8ba2b8
1 <?php
2 /**
3 * The web entry point for ResourceLoader, which serves static CSS/JavaScript
4 * via ResourceLoaderModule subclasses.
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 wfLoadMain();
40 function wfLoadMain() {
41 global $wgRequest;
43 // Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
44 // writes when getting database connections for ResourceLoader. (T192611)
45 MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->disableChronologyProtection();
47 $resourceLoader = MediaWikiServices::getInstance()->getResourceLoader();
48 $context = new ResourceLoaderContext( $resourceLoader, $wgRequest );
50 // Respond to ResourceLoader request
51 $resourceLoader->respond( $context );
53 Profiler::instance()->setAllowOutput();
55 $mediawiki = new MediaWiki();
56 $mediawiki->doPostOutputShutdown();