From: Ori Livneh Date: Fri, 14 Mar 2014 02:06:07 +0000 (-0700) Subject: Emit $wgSearchType as JavaScript config variable X-Git-Tag: 1.31.0-rc.0~16623 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=ac99ef7c25a312198dad85c006cc8f7b3acfaf6f;hp=726ec65bd76c43a1dc189e63cca1d83ff1a9fb46;p=lhc%2Fweb%2Fwiklou.git 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 --- 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)