Commit 28f0b5ce authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixed: Project#enabled_module_names= does not test if a module is already enabled (#4200).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3036 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 02410035
......@@ -389,7 +389,7 @@ class Project < ActiveRecord::Base
# remove disabled modules
enabled_modules.each {|mod| mod.destroy unless module_names.include?(mod.name)}
# add new modules
module_names.each {|name| enabled_modules << EnabledModule.new(:name => name)}
module_names.reject {|name| module_enabled?(name)}.each {|name| enabled_modules << EnabledModule.new(:name => name)}
else
enabled_modules.clear
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment