summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2022-11-27 10:08:40 +0000
committerGitHub <noreply@github.com>2022-11-27 10:08:40 +0000
commitf6fd501841816f5e5c1c9a30fbc4c9a2a6f987bc (patch)
tree8f8919a0daec62f9d41827fcbf5f87ea6617a7ce /modules/setting/setting.go
parent32590db4cafe8fea30be3d19ba0f179f06a35427 (diff)
downloadgitea-f6fd501841816f5e5c1c9a30fbc4c9a2a6f987bc.tar.gz
gitea-f6fd501841816f5e5c1c9a30fbc4c9a2a6f987bc.zip
Correct the fallbacks for mailer configuration (#21945)
Unfortunately the fallback configuration code for [mailer] that were added in #18982 are incorrect. When you read a value from an ini section that key is added. This leads to a failure of the fallback mechanism. Further there is also a spelling mistake in the startTLS configuration. This PR restructures the mailer code to first map the deprecated settings on to the new ones - and then use ini.MapTo to map those on to the struct with additional validation as necessary. Ref #21744 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index fb425c8717..df7310b09b 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -605,7 +605,7 @@ func LoadForTest(extraConfigs ...string) {
func deprecatedSetting(oldSection, oldKey, newSection, newKey string) {
if Cfg.Section(oldSection).HasKey(oldKey) {
- log.Error("Deprecated fallback `[%s]` `%s` present. Use `[%s]` `%s` instead. This fallback will be removed in v1.18.0", oldSection, oldKey, newSection, newKey)
+ log.Error("Deprecated fallback `[%s]` `%s` present. Use `[%s]` `%s` instead. This fallback will be removed in v1.19.0", oldSection, oldKey, newSection, newKey)
}
}