sourceInfo changed in Firefogg, update min version and reading values from it.
[mediawiki.git] / mwScriptLoader.php
blobe307938862d8a26da93b8f65fd90ae7dcfe909bb
1 <?php
2 /**
3 * mvwScriptLoader.php
4 * Script Loading Library for MediaWiki
6 * @file
7 * @author Michael Dale mdale@wikimedia.org
8 * @date feb, 2009
9 * @link http://www.mediawiki.org/wiki/ScriptLoader Documentation
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * http://www.gnu.org/copyleft/gpl.html
27 // include WebStart.php
28 require_once('includes/WebStart.php');
30 wfProfileIn( 'mvwScriptLoader.php' );
33 if( strpos( wfGetScriptUrl(), "mwScriptLoader.php" ) === false ){
34 wfHttpError( 403, 'Forbidden',
35 'mvwScriptLoader must be accessed through the primary script entry point.' );
36 return;
38 // Verify the script loader is on:
39 if ( !$wgEnableScriptLoader ) {
40 echo '/*ScriptLoader is not enabled for this site. To enable add the following line to your LocalSettings.php';
41 echo '<pre><b>$wgEnableScriptLoader=true;</b></pre>*/';
42 echo 'alert(\'Script loader is disabled\');';
43 die( 1 );
46 //moved to setup.php
47 // load the mwEmbed language file:
48 //$wgExtensionMessagesFiles['mwEmbed'] = "{$IP}/js2/mwEmbed/php/languages/mwEmbed.i18n.php";
50 // run jsScriptLoader action:
51 $myScriptLoader = new jsScriptLoader();
52 $myScriptLoader->doScriptLoader();
54 wfProfileOut( 'mvwScriptLoader.php' );