From: Grant Slater Date: Sat, 14 May 2016 04:39:43 +0000 (+0100) Subject: Add wiki site notice support X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/5038552aa329db50d1710c9fb500217c640b287f Add wiki site notice support --- diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index f53f85ee2..26893ecb9 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -312,6 +312,9 @@ $wgNamespacesToBeSearchedDefault[NS_LANG_NL] = TRUE; $wgNamespacesToBeSearchedDefault[NS_LANG_RU] = TRUE; $wgNamespacesToBeSearchedDefault[NS_LANG_JA] = TRUE; +<% if @mediawiki[:site_notice] -%> +$wgSiteNotice = "<%= @mediawiki[:site_notice] %>"; +<% end -%> <% if @mediawiki[:site_readonly] -%> $wgReadOnly = "<%= @mediawiki[:site_readonly] %>"; <% end -%> diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index fdc324bce..3547a8f19 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -52,6 +52,7 @@ mediawiki_site "wiki.openstreetmap.org" do recaptcha_public_key "6LdFIQATAAAAAMwtHeI8KDgPqvRbXeNYSq1gujKz" recaptcha_private_key passwords["recaptcha"] + site_notice "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT." site_readonly "MAINTENANCE: WIKI READ-ONLY UNTIL Monday 16 May 2016 - 11:00am UTC/GMT." end