Merged r12163 from trunk (#14590, #14592).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12211 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-10-13 08:24:48 +00:00
parent 4deca5976e
commit c4eb7c380e
2 changed files with 27 additions and 8 deletions
+13 -4
View File
@@ -762,10 +762,19 @@ namespace :redmine do
prompt('Target project identifier') {|identifier| TracMigrate.target_project_identifier identifier}
puts
# Turn off email notifications
Setting.notified_events = []
TracMigrate.migrate
old_notified_events = Setting.notified_events
old_password_min_length = Setting.password_min_length
begin
# Turn off email notifications temporarily
Setting.notified_events = []
Setting.password_min_length = 4
# Run the migration
TracMigrate.migrate
ensure
# Restore previous settings
Setting.notified_events = old_notified_events
Setting.password_min_length = old_password_min_length
end
end
end