Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -1,5 +1,7 @@
# frozen_string_literal: true
# Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang
# Copyright (C) 2006-2019 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,6 +22,7 @@ module Redmine
# Configuration default values
@defaults = {
'avatar_server_url' => 'https://www.gravatar.com',
'email_delivery' => nil,
'max_concurrent_ajax_uploads' => 2
}
@ -53,6 +56,12 @@ module Redmine
if @config['email_delivery']
ActionMailer::Base.perform_deliveries = true
@config['email_delivery'].each do |k, v|
# Comprehensive error message for those who used async_smtp and async_sendmail
# delivery methods that are removed in Redmine 4.0.
if k == 'delivery_method' && v.to_s =~ /\Aasync_(.+)/
abort "Redmine now uses ActiveJob to send emails asynchronously and the :#{v} delivery method is no longer available.\n" +
"Please update your config/configuration.yml to use :#$1 delivery method instead."
end
v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
ActionMailer::Base.send("#{k}=", v)
end
@ -114,7 +123,7 @@ module Redmine
# Checks the validness of regular expressions set for repository paths at startup
def check_regular_expressions
@config.each do |name, value|
if value.present? && name =~ /^scm_.+_path_regexp$/
if value.present? && /^scm_.+_path_regexp$/.match?(name)
begin
Regexp.new value.to_s.strip
rescue => e