Remove $wgScriptExtension (deprecated and ignored since 1.25)
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderStartUpModule.php
index ae9520d..2e3c6fc 100644 (file)
@@ -88,7 +88,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgUrlProtocols' => wfUrlProtocols(),
                        'wgArticlePath' => $conf->get( 'ArticlePath' ),
                        'wgScriptPath' => $conf->get( 'ScriptPath' ),
-                       'wgScriptExtension' => '.php',
                        'wgScript' => wfScript(),
                        'wgSearchType' => $conf->get( 'SearchType' ),
                        'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
@@ -101,8 +100,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgContentLanguage' => $wgContLang->getCode(),
                        'wgTranslateNumerals' => $conf->get( 'TranslateNumerals' ),
                        'wgVersion' => $conf->get( 'Version' ),
-                       'wgEnableAPI' => $conf->get( 'EnableAPI' ),
-                       'wgEnableWriteAPI' => $conf->get( 'EnableWriteAPI' ),
+                       'wgEnableAPI' => true, // Deprecated since MW 1.32
+                       'wgEnableWriteAPI' => true, // Deprecated since MW 1.32
                        'wgMainPageTitle' => $mainPage->getPrefixedText(),
                        'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(),
                        'wgNamespaceIds' => $namespaceIds,
@@ -206,7 +205,9 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
         */
        public function getModuleRegistrations( ResourceLoaderContext $context ) {
                $resourceLoader = $context->getResourceLoader();
-               $target = $context->getRequest()->getVal( 'target', 'desktop' );
+               // Future developers: Use WebRequest::getRawVal() instead getVal().
+               // The getVal() method performs slow Language+UTF logic. (f303bb9360)
+               $target = $context->getRequest()->getRawVal( 'target', 'desktop' );
                // Bypass target filter if this request is Special:JavaScriptTest.
                // To prevent misuse in production, this is only allowed if testing is enabled server-side.
                $byPassTargetFilter = $this->getConfig()->get( 'EnableJavaScriptTest' ) && $target === 'test';