Emit $wgSearchType as JavaScript config variable
authorOri Livneh <ori@wikimedia.org>
Fri, 14 Mar 2014 02:06:07 +0000 (19:06 -0700)
committerOri Livneh <ori@wikimedia.org>
Fri, 14 Mar 2014 02:06:07 +0000 (19:06 -0700)
Allows for the search interface to be customzied for the particular
search-engine used, and allows collecting client-side performance measurements
that specify which search engine was used.

Change-Id: Ibeda834e9d5dbaf1d7e40c2dacbc60feb2cc4bba

includes/resourceloader/ResourceLoaderStartUpModule.php

index 207e96b..d34fb5c 100644 (file)
@@ -42,7 +42,8 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        $wgEnableAPI, $wgEnableWriteAPI, $wgDBname,
                        $wgSitename, $wgFileExtensions, $wgExtensionAssetsPath,
                        $wgCookiePrefix, $wgResourceLoaderMaxQueryLength,
-                       $wgResourceLoaderStorageEnabled, $wgResourceLoaderStorageVersion;
+                       $wgResourceLoaderStorageEnabled, $wgResourceLoaderStorageVersion,
+                       $wgSearchType;
 
                $mainPage = Title::newMainPage();
 
@@ -71,6 +72,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgScriptPath' => $wgScriptPath,
                        'wgScriptExtension' => $wgScriptExtension,
                        'wgScript' => $wgScript,
+                       'wgSearchType' => $wgSearchType,
                        'wgVariantArticlePath' => $wgVariantArticlePath,
                        // Force object to avoid "empty" associative array from
                        // becoming [] instead of {} in JS (bug 34604)