]> source.dussan.org Git - gitea.git/commitdiff
models: fix XORM API break
authorUnknwon <joe2010xtmf@163.com>
Sat, 14 Feb 2015 22:01:33 +0000 (17:01 -0500)
committerUnknwon <joe2010xtmf@163.com>
Sat, 14 Feb 2015 22:01:33 +0000 (17:01 -0500)
cmd/web.go: check version after load config

cmd/web.go
gogs.go
models/models.go
templates/.VERSION

index 3284acb9df65a8a774d6d9781fc46fca0522c6df..4b06a882c0875210c3f0d69f870d02c0ef1e9221 100644 (file)
@@ -166,12 +166,11 @@ func newMacaron() *macaron.Macaron {
 }
 
 func runWeb(ctx *cli.Context) {
-       checkVersion()
-
        if ctx.IsSet("config") {
                setting.CustomConf = ctx.String("config")
        }
        routers.GlobalInit()
+       checkVersion()
 
        m := newMacaron()
 
diff --git a/gogs.go b/gogs.go
index 76c6c71fc36a123fc81bf4c66ba532f31ef737a2..34790b72580b73497338c6db77f44727e8c53233 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
        "github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.5.13.0212 Beta"
+const APP_VER = "0.5.13.0214 Beta"
 
 func init() {
        runtime.GOMAXPROCS(runtime.NumCPU())
index 35e803834ca76321ab415813fb6237cc4a0c633d..486aceac22fbfcfd46111c6733c8f50335f04e03 100644 (file)
@@ -121,7 +121,7 @@ func SetEngine() (err error) {
        if err != nil {
                return fmt.Errorf("models.init(fail to create xorm.log): %v", err)
        }
-       x.Logger = xorm.NewSimpleLogger(f)
+       x.SetLogger(xorm.NewSimpleLogger(f))
 
        x.ShowSQL = true
        x.ShowInfo = true
index 6d13155b0231f4d42f459033f5951a045d2735d3..0c9421a4d2e2664c7a0707429a1cdb31dd4bcab0 100644 (file)
@@ -1 +1 @@
-0.5.13.0212 Beta
\ No newline at end of file
+0.5.13.0214 Beta
\ No newline at end of file