From ac99ef7c25a312198dad85c006cc8f7b3acfaf6f Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Thu, 13 Mar 2014 19:06:07 -0700 Subject: [PATCH] Emit $wgSearchType as JavaScript config variable 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 207e96b85b..d34fb5c29c 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -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) -- 2.20.1