]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mediawiki/templates/default/LocalSettings.php.erb
mediawiki: enable QuickInstantCommons
[chef.git] / cookbooks / mediawiki / templates / default / LocalSettings.php.erb
index 7b7190005395909fc09b8aec55c64c28eb2ff5ba..5c88ccce55b90b14a5391d4b5833d2fa2bdc31b7 100644 (file)
@@ -112,22 +112,6 @@ $wgSVGConverters = array( 'rsvg' => '/usr/bin/rsvg-convert -w $width -h $height
 $wgSVGConverter = 'rsvg';
 $wgSVGMaxSize = 2000;
 
-<% if @mediawiki[:commons] -%>
-# Enable use of images from https://commons.wikimedia.org
-$wgForeignFileRepos[] = [
-  'class' => ForeignAPIRepo::class,
-  'name' => 'wikimediacommons',
-  'apibase' => 'https://commons.wikimedia.org/w/api.php',
-  'url' => 'https://upload.wikimedia.org/wikipedia/commons',
-  'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/commons/thumb',
-  'hashLevels' => 2,
-  'transformVia404' => true,
-  'fetchDescription' => true,
-  'descriptionCacheExpiry' => 604800,
-  'apiThumbCacheExpiry' => 604800,
-];
-<% end -%>
-
 ## If you use ImageMagick (or any other shell command) on a
 ## Linux server, this will need to be set to the name of an
 ## available UTF-8 locale
@@ -368,6 +352,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;