From 5038552aa329db50d1710c9fb500217c640b287f Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sat, 14 May 2016 05:39:43 +0100 Subject: [PATCH] Add wiki site notice support --- cookbooks/mediawiki/templates/default/LocalSettings.php.erb | 3 +++ cookbooks/wiki/recipes/default.rb | 1 + 2 files changed, 4 insertions(+) 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 -- 2.39.5