X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/1fcdb60994e181c758ebda4f5ccfc4e2280d8f0c..583a01cf4a834db5e803b7004e5b7bd03284e7b6:/cookbooks/mediawiki/templates/default/LocalSettings.php.erb diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index 80a5e8710..dc1439750 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -16,7 +16,7 @@ $wgMetaNamespace = '<%= @mediawiki[:metanamespace] %>'; ## defaults for all runtime URL paths are based off of this. ## For more information on customizing the URLs ## (like /w/index.php/Page_title to /wiki/Page_title) please see: -## http://www.mediawiki.org/wiki/Manual:Short_URL +## https://www.mediawiki.org/wiki/Manual:Short_URL $wgScriptPath = "/w"; $wgArticlePath = '/wiki/$1'; $wgUsePathInfo = true; @@ -24,13 +24,11 @@ $wgScriptExtension = ".php"; ## The protocol and server name to use in fully-qualified URLs $wgServer = "//<%= @name %>"; -$wgInternalServer = 'http://<%= @name %>'; +$wgInternalServer = 'https://<%= @name %>'; -<% if @mediawiki[:ssl_enabled] -%> $wgSecureLogin = true; $wgDefaultUserOptions['prefershttps'] = 1; -<% end -%> -$wgCookieSecure = false; +$wgCookieSecure = true; ## The relative URL path to the skins directory $wgStylePath = "$wgScriptPath/skins"; @@ -93,16 +91,26 @@ $wgFileExtensions[] = 'doc'; $wgFileExtensions[] = 'pdf'; $wgFileExtensions[] = 'odt'; $wgFileExtensions[] = 'odp'; +$wgFileExtensions[] = 'ods'; $wgFileExtensions[] = 'svg'; +$wgFileExtensions[] = 'osm'; <% @mediawiki[:extra_file_extensions].each do |mw_extra_file_extension| -%> $wgFileExtensions[] = '<%= mw_extra_file_extension %>'; <% end -%> +# Add OSM XML file format per http://www.iana.org/assignments/media-types/media-types.xhtml +# Shout out to Paul Norman for reserving this. +# Helps MimeMagic determine XML-based formats and chooses the correct MimeType +# for .osm files. +$wgXMLMimeTypes[] = array('osm' => 'application/vnd.openstreetmap.data+xml'); + +$wgTrustedMediaFormats[] = 'application/vnd.openstreetmap.data+xml'; + $wgSVGConverters = array( 'rsvg' => '/usr/bin/rsvg-convert -w $width -h $height -o $output $input'); $wgSVGConverter = 'rsvg'; $wgSVGMaxSize = 2000; -# InstantCommons allows wiki to use images from http://commons.wikimedia.org +# InstantCommons allows wiki to use images from https://commons.wikimedia.org <% if @mediawiki[:commons] -%> $wgUseInstantCommons = true; <% else -%> @@ -142,7 +150,7 @@ $wgDefaultSkin = "<%= @mediawiki[:skin] %>"; ## appropriate copyright notice / icon. GNU Free Documentation ## License and Creative Commons licenses are supported so far. $wgRightsPage = "Wiki_content_license"; # Set to the title of a wiki page that describes your license/copyright -$wgRightsUrl = "http://creativecommons.org/licenses/by-sa/2.0/"; +$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/2.0/"; $wgRightsText = "Creative Commons Attribution-ShareAlike 2.0 license"; $wgRightsIcon = "/cc-wiki.png";