summaryrefslogtreecommitdiffstats
path: root/modules/setting/mirror.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/mirror.go')
-rw-r--r--modules/setting/mirror.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/setting/mirror.go b/modules/setting/mirror.go
index 9ddce97daf..875062f522 100644
--- a/modules/setting/mirror.go
+++ b/modules/setting/mirror.go
@@ -24,16 +24,16 @@ var Mirror = struct {
DefaultInterval: 8 * time.Hour,
}
-func newMirror() {
+func loadMirrorFrom(rootCfg ConfigProvider) {
// Handle old configuration through `[repository]` `DISABLE_MIRRORS`
// - please note this was badly named and only disabled the creation of new pull mirrors
// FIXME: DEPRECATED to be removed in v1.18.0
- deprecatedSetting("repository", "DISABLE_MIRRORS", "mirror", "ENABLED")
- if Cfg.Section("repository").Key("DISABLE_MIRRORS").MustBool(false) {
+ deprecatedSetting(rootCfg, "repository", "DISABLE_MIRRORS", "mirror", "ENABLED")
+ if rootCfg.Section("repository").Key("DISABLE_MIRRORS").MustBool(false) {
Mirror.DisableNewPull = true
}
- if err := Cfg.Section("mirror").MapTo(&Mirror); err != nil {
+ if err := rootCfg.Section("mirror").MapTo(&Mirror); err != nil {
log.Fatal("Failed to map Mirror settings: %v", err)
}