]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/civicrm/recipes/default.rb
Mediawiki: increase autoblock period + spam filter regex
[chef.git] / cookbooks / civicrm / recipes / default.rb
index a88d82df662c0e155d4d2a501d505a7e70614406..cf46d686e97b7a5c3f4916e255a287995e2b8397 100644 (file)
@@ -52,6 +52,11 @@ wordpress_plugin "registration-honeypot" do
   site "join.osmfoundation.org"
 end
 
   site "join.osmfoundation.org"
 end
 
+wordpress_plugin "sitepress-multilingual-cms" do
+  site "join.osmfoundation.org"
+  repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
+end
+
 civicrm_version = node[:civicrm][:version]
 civicrm_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm"
 
 civicrm_version = node[:civicrm][:version]
 civicrm_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm"
 
@@ -112,6 +117,24 @@ directory "/srv/join.osmfoundation.org/wp-content/plugins/files" do
   mode 0755
 end
 
   mode 0755
 end
 
+extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-extensions"
+
+directory extensions_directory do
+  owner "wordpress"
+  group "wordpress"
+  mode 0755
+end
+
+node[:civicrm][:extensions].each do |_, details|
+  git "#{extensions_directory}/#{details[:name]}" do
+    action :sync
+    repository details[:repository]
+    revision details[:revision]
+    user "wordpress"
+    group "wordpress"
+  end
+end
+
 settings = edit_file "#{civicrm_directory}/civicrm/templates/CRM/common/civicrm.settings.php.template" do |line|
   line.gsub!(/%%cms%%/, "WordPress")
   line.gsub!(/%%CMSdbUser%%/, "civicrm")
 settings = edit_file "#{civicrm_directory}/civicrm/templates/CRM/common/civicrm.settings.php.template" do |line|
   line.gsub!(/%%cms%%/, "WordPress")
   line.gsub!(/%%CMSdbUser%%/, "civicrm")
@@ -126,6 +149,7 @@ settings = edit_file "#{civicrm_directory}/civicrm/templates/CRM/common/civicrm.
   line.gsub!(/%%templateCompileDir%%/, "/srv/join.osmfoundation.org/wp-content/plugins/files/civicrm/templates_c/")
   line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
   line.gsub!(/%%siteKey%%/, site_key)
   line.gsub!(/%%templateCompileDir%%/, "/srv/join.osmfoundation.org/wp-content/plugins/files/civicrm/templates_c/")
   line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
   line.gsub!(/%%siteKey%%/, site_key)
+  line.gsub!(%r{// *(.*'ext_repo_url'.*)$}, "\\1")
 
   line
 end
 
   line
 end