aboutsummaryrefslogtreecommitdiffstats
path: root/modules/setting/database.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/database.go')
-rw-r--r--modules/setting/database.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/setting/database.go b/modules/setting/database.go
index d7a5078fe9..8c4dfb21d7 100644
--- a/modules/setting/database.go
+++ b/modules/setting/database.go
@@ -54,7 +54,11 @@ var (
// LoadDBSetting loads the database settings
func LoadDBSetting() {
- sec := CfgProvider.Section("database")
+ loadDBSetting(CfgProvider)
+}
+
+func loadDBSetting(rootCfg ConfigProvider) {
+ sec := rootCfg.Section("database")
Database.Type = DatabaseType(sec.Key("DB_TYPE").String())
defaultCharset := "utf8"