2010-09-04 04:00:09 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
2020-06-17 00:10:56 +00:00
|
|
|
* The web entry point for ResourceLoader, which serves static CSS/JavaScript
|
|
|
|
|
* via ResourceLoaderModule subclasses.
|
2010-09-04 06:46:50 +00:00
|
|
|
*
|
2010-09-04 04:00:09 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
2010-09-04 06:46:50 +00:00
|
|
|
* @file
|
2020-02-04 21:44:38 +00:00
|
|
|
* @ingroup entrypoint
|
|
|
|
|
* @ingroup ResourceLoader
|
2010-09-04 04:00:09 +00:00
|
|
|
* @author Roan Kattouw
|
|
|
|
|
* @author Trevor Parscal
|
|
|
|
|
*/
|
2010-09-04 12:53:01 +00:00
|
|
|
|
2016-09-28 20:37:20 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
2015-06-04 03:52:45 +00:00
|
|
|
|
2016-02-25 21:54:06 +00:00
|
|
|
// This endpoint is supposed to be independent of request cookies and other
|
2016-02-25 21:54:06 +00:00
|
|
|
// details of the session. Enforce this constraint with respect to session use.
|
|
|
|
|
define( 'MW_NO_SESSION', 1 );
|
2016-02-25 21:54:06 +00:00
|
|
|
|
2019-09-02 23:55:00 +00:00
|
|
|
define( 'MW_ENTRY_POINT', 'load' );
|
|
|
|
|
|
2013-05-17 00:16:59 +00:00
|
|
|
require __DIR__ . '/includes/WebStart.php';
|
2011-05-30 13:49:09 +00:00
|
|
|
|
2020-06-25 02:33:46 +00:00
|
|
|
wfLoadMain();
|
2016-09-28 20:37:20 +00:00
|
|
|
|
2020-06-25 02:33:46 +00:00
|
|
|
function wfLoadMain() {
|
|
|
|
|
global $wgRequest;
|
2016-03-10 23:33:58 +00:00
|
|
|
|
2021-09-25 23:55:13 +00:00
|
|
|
$services = MediaWikiServices::getInstance();
|
2020-06-25 02:33:46 +00:00
|
|
|
// Disable ChronologyProtector so that we don't wait for unrelated MediaWiki
|
|
|
|
|
// writes when getting database connections for ResourceLoader. (T192611)
|
2021-09-25 23:55:13 +00:00
|
|
|
$services->getDBLoadBalancerFactory()->disableChronologyProtection();
|
2010-09-04 04:00:09 +00:00
|
|
|
|
2021-09-25 23:55:13 +00:00
|
|
|
$resourceLoader = $services->getResourceLoader();
|
2020-06-25 02:33:46 +00:00
|
|
|
$context = new ResourceLoaderContext( $resourceLoader, $wgRequest );
|
2010-09-04 04:00:09 +00:00
|
|
|
|
2020-06-25 02:33:46 +00:00
|
|
|
// Respond to ResourceLoader request
|
|
|
|
|
$resourceLoader->respond( $context );
|
|
|
|
|
|
2021-04-08 01:34:50 +00:00
|
|
|
// Append any visible profiling data in a manner appropriate for the Content-Type
|
2021-09-25 23:55:13 +00:00
|
|
|
$profiler = Profiler::instance();
|
|
|
|
|
$profiler->setAllowOutput();
|
|
|
|
|
$profiler->logDataPageOutputOnly();
|
2020-06-25 02:33:46 +00:00
|
|
|
|
|
|
|
|
$mediawiki = new MediaWiki();
|
|
|
|
|
$mediawiki->doPostOutputShutdown();
|
|
|
|
|
}
|