From: Grant Slater Date: Tue, 2 Aug 2022 21:57:23 +0000 (+0300) Subject: mediawiki: fix CirrusSearch tweak X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/8a453080af3ff555115f67fb82697fa40f7ba56c?ds=sidebyside mediawiki: fix CirrusSearch tweak --- diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index 7b7190005..d5bbf71a7 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -368,6 +368,13 @@ $wgForceUIMsgAsContentMsg = array( 'mainpage-url', 'mapfeatures-url', 'contribut <%= "require_once('#{file}');" %> <% end -%> +<% if @name == "wiki.openstreetmap.org" -%> +# setting the search weight of the main wiki's proposal namespace lower then general talk pages (0.2), but +# higher then wiki project namespace (0.1) +# Documentation at https://phabricator.wikimedia.org/source/extension-cirrussearch/browse/master/docs/settings.txt$693 +$wgCirrusSearchNamespaceWeights = array_merge ( $wgCirrusSearchNamespaceWeights, array ( NS_PROPOSAL => 0.15 )); +<% end -%> + <% if not(@mediawiki[:private_accounts]) and not(@mediawiki[:private_site]) -%> # require user confirmation for certain actions $wgGroupPermissions['user']['move'] = false; diff --git a/cookbooks/mediawiki/templates/default/mw-ext-CirrusSearch.inc.php.erb b/cookbooks/mediawiki/templates/default/mw-ext-CirrusSearch.inc.php.erb index 8a6ef31ca..ddb87f166 100644 --- a/cookbooks/mediawiki/templates/default/mw-ext-CirrusSearch.inc.php.erb +++ b/cookbooks/mediawiki/templates/default/mw-ext-CirrusSearch.inc.php.erb @@ -3,8 +3,3 @@ wfLoadExtension( 'CirrusSearch' ); $wgDisableSearchUpdate = false; $wgSearchType = 'CirrusSearch'; - -# setting the search weight of the main wiki's proposal namespace lower then general talk pages (0.2), but -# higher then wiki project namespace (0.1) -# Documentation at https://phabricator.wikimedia.org/source/extension-cirrussearch/browse/master/docs/settings.txt$693 -$wgCirrusSearchNamespaceWeights = array_merge ( $wgCirrusSearchNamespaceWeights, array ( NS_PROPOSAL => 0.15 ));