Skip to content

Commit

Permalink
updated to redmine 1.1 - project now activates modules correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Feb 9, 2011
1 parent b3155f5 commit 2f63c46
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/redmine_sympa/patches/project_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ def self.included(base)
base.extend(ClassMethods)
base.class_eval do
unloadable # Send unloadable so it will not be unloaded in development

# This replaces the existing version of enabled_module_names with a new one
# It is needed because we need the "destroy" callbacks to be fired,
# and only on the erased modules (not all of them - the default implementation
# starts by wiping them out - v0.8)
alias_method :enabled_module_names=, :sympa_enabled_module_names=

end
end

Expand All @@ -23,17 +16,6 @@ module InstanceMethods
def has_sympa_mailing_list?
return self.module_enabled?(:sympa_mailing_list)
end

# Redefine enabled_module_names so it invokes mod.destroy on disconnected modules
def sympa_enabled_module_names=(module_names)
module_names = [] unless module_names and module_names.is_a?(Array)
module_names = module_names.collect(&:to_s)
# remove disabled modules
enabled_modules.each {|mod| mod.destroy unless module_names.include?(mod.name)}

# detect the modules that are new, and create those only
module_names.reject {|name| module_enabled?(name)}.each {|name| enabled_modules << EnabledModule.new(:name => name) }
end

def sympa_mailing_list_address
"#{identifier}@#{Setting.plugin_redmine_sympa['redmine_sympa_domain']}"
Expand Down

0 comments on commit 2f63c46

Please sign in to comment.