# limitations under the License.
#
-define :mediawiki_extension, :action => [ :enable ] do
+define :mediawiki_extension, :action => [ :enable ], :variables => {} do
name = params[:name]
site = params[:site]
- site_directory = node[:mediawiki][:sites][site][:site_directory]
mediawiki_directory = node[:mediawiki][:sites][site][:directory]
extension_directory = "#{mediawiki_directory}/extensions/#{name}"
source = params[:source]
template = params[:template]
+ template_variables = params[:variables]
if source
remote_directory extension_directory do
user node[:mediawiki][:user]
group node[:mediawiki][:group]
mode 0664
+ variables template_variables
notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
end
end
mode 0664
content "<?php require_once('#{extension_directory}/#{name}.php');\n"
only_if do File.exist?("#{extension_directory}/#{name}.php") end
- notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
+ notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
end
end