* http://www.gnu.org/copyleft/gpl.html
*/
+//first do a quick static check for the cached file
+define('MW_CACHE_SCRIPT_CHECK', true);
+require_once( dirname(__FILE__) . '/js2/mwEmbed/jsScriptLoader.php');
+$myScriptLoader = new jsScriptLoader();
+if( $myScriptLoader->outputFromCache() ){
+ exit();
+}
+
+//Else load up mediaWiki stuff and continue scriptloader processing:
+
// include WebStart.php
+ob_start();
require_once('includes/WebStart.php');
+$webstartwhitespace = ob_end_clean();
-wfProfileIn( 'mvwScriptLoader.php' );
+wfProfileIn( 'mwScriptLoader.php' );
-
-if( strpos( wfGetScriptUrl(), "mwScriptLoader.php" ) === false ){
+if( $wgRequest->isPathInfoBad() ){
wfHttpError( 403, 'Forbidden',
+ 'Invalid file extension found in PATH_INFO. ' .
'mwScriptLoader must be accessed through the primary script entry point.' );
return;
}
die( 1 );
}
-//moved to setup.php
-// load the mwEmbed language file:
-//$wgExtensionMessagesFiles['mwEmbed'] = "{$IP}/js2/mwEmbed/php/languages/mwEmbed.i18n.php";
-
-// run jsScriptLoader action:
-$myScriptLoader = new jsScriptLoader();
+//load the language file and
+// Run jsScriptLoader action:
$myScriptLoader->doScriptLoader();
-wfProfileOut( 'mvwScriptLoader.php' );
\ No newline at end of file
+
+wfProfileOut( 'mwScriptLoader.php' );