summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-07 17:22:15 -0500
committerUnknown <joe2010xtmf@163.com>2014-03-07 17:22:15 -0500
commit5a05d6633d413b1c5182a0a542e173f99601a103 (patch)
treeb6d343ca8c998909839d1364f466f7af223fdd1b /models/models.go
parenta2a59f8ad1192d3504abd50b2daf2ebfd97c86ca (diff)
downloadgitea-5a05d6633d413b1c5182a0a542e173f99601a103.tar.gz
gitea-5a05d6633d413b1c5182a0a542e173f99601a103.zip
Merge utils to modules
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/models/models.go b/models/models.go
index 0dee65478f..e0ab3ca15a 100644
--- a/models/models.go
+++ b/models/models.go
@@ -12,7 +12,7 @@ import (
_ "github.com/go-sql-driver/mysql"
"github.com/lunny/xorm"
- "github.com/gogits/gogs/utils"
+ "github.com/gogits/gogs/modules/base"
)
var (
@@ -41,11 +41,11 @@ type Comment struct {
}
func setEngine() {
- dbType := utils.Cfg.MustValue("database", "DB_TYPE")
- dbHost := utils.Cfg.MustValue("database", "HOST")
- dbName := utils.Cfg.MustValue("database", "NAME")
- dbUser := utils.Cfg.MustValue("database", "USER")
- dbPwd := utils.Cfg.MustValue("database", "PASSWD")
+ dbType := base.Cfg.MustValue("database", "DB_TYPE")
+ dbHost := base.Cfg.MustValue("database", "HOST")
+ dbName := base.Cfg.MustValue("database", "NAME")
+ dbUser := base.Cfg.MustValue("database", "USER")
+ dbPwd := base.Cfg.MustValue("database", "PASSWD")
uname, err := user.Current()
if err != nil {
@@ -54,7 +54,7 @@ func setEngine() {
}
if uname.Username == "jiahuachen" {
- dbPwd = utils.Cfg.MustValue("database", "PASSWD_jiahua")
+ dbPwd = base.Cfg.MustValue("database", "PASSWD_jiahua")
}
switch dbType {
@@ -82,9 +82,9 @@ func setEngine() {
//log.Trace("Initialized database -> %s", dbName)
- RepoRootPath = utils.Cfg.MustValue("repository", "ROOT")
+ RepoRootPath = base.Cfg.MustValue("repository", "ROOT")
if uname.Username == "jiahuachen" {
- RepoRootPath = utils.Cfg.MustValue("repository", "ROOT_jiahuachen")
+ RepoRootPath = base.Cfg.MustValue("repository", "ROOT_jiahuachen")
}
}