From 49a79951da4331a70e5408da409434876827e6c0 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 31 Jan 2016 19:44:15 +0000 Subject: [PATCH] Remove ConfirmEdit if private wiki --- cookbooks/mediawiki/providers/site.rb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/cookbooks/mediawiki/providers/site.rb b/cookbooks/mediawiki/providers/site.rb index c422b9c2f..e78ca3a25 100644 --- a/cookbooks/mediawiki/providers/site.rb +++ b/cookbooks/mediawiki/providers/site.rb @@ -199,12 +199,20 @@ action :create do update_site false end - mediawiki_extension "ConfirmEdit" do - site new_resource.name - template "mw-ext-ConfirmEdit.inc.php.erb" - variables :public_key => new_resource.recaptcha_public_key, - :private_key => new_resource.recaptcha_private_key - update_site false + if new_resource.private_accounts || new_resource.private + mediawiki_extension "ConfirmEdit" do + site new_resource.name + update_site false + action :delete + end + else + mediawiki_extension "ConfirmEdit" do + site new_resource.name + template "mw-ext-ConfirmEdit.inc.php.erb" + variables :public_key => new_resource.recaptcha_public_key, + :private_key => new_resource.recaptcha_private_key + update_site false + end end mediawiki_extension "Gadgets" do -- 2.39.5