]> source.dussan.org Git - gitea.git/commitdiff
Update with macaron
authorUnknwon <joe2010xtmf@163.com>
Mon, 6 Oct 2014 23:12:52 +0000 (19:12 -0400)
committerUnknwon <joe2010xtmf@163.com>
Mon, 6 Oct 2014 23:12:52 +0000 (19:12 -0400)
.bra.toml
cmd/web.go
modules/middleware/context.go
routers/org/setting.go

index a5afa27675ba8a8797f7abf3dae82bc6593becba..a5fcdf6ee57cce5e3f887967bd8b140034e656da 100644 (file)
--- a/.bra.toml
+++ b/.bra.toml
@@ -11,7 +11,7 @@ watch_dirs = [
 watch_exts = [".go", ".ini"]
 build_delay = 1500
 cmds = [
-       ["go", "install"],
-       ["go", "build"],
+       ["go", "install", "-tags", "sqlite"],
+       ["go", "build", "-tags", "sqlite"],
        ["./gogs", "web"]
 ]
\ No newline at end of file
index 810e36d3bbd4ee0b238c7c41cc7680add583bb77..201eb48f0e7fcfc42e39004b58d8c58d3c48fca4 100644 (file)
@@ -61,10 +61,14 @@ func checkVersion() {
                log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
        }
 
-       // Macaron.
+       // Check dependency version.
        macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], "."))
-       if macaronVer.LessThan(git.MustParseVersion("0.1.8")) {
-               log.Fatal(4, "Macaron version does not match, did you forget to update?(github.com/Unknwon/macaron)")
+       if macaronVer.LessThan(git.MustParseVersion("0.2.0")) {
+               log.Fatal(4, "Macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
+       }
+       i18nVer := git.MustParseVersion(i18n.Version())
+       if i18nVer.LessThan(git.MustParseVersion("0.0.1")) {
+               log.Fatal(4, "i18n version is too old, did you forget to update?(github.com/macaron-contrib/i18n)")
        }
 }
 
index 90716d2c5975fae3132ac93ad27de3d9c2fe11a8..1d9f57389853543c71f253c7312add47ed40722c 100644 (file)
@@ -29,7 +29,6 @@ import (
 // Context represents context of a request.
 type Context struct {
        *macaron.Context
-       i18n.Locale
        Cache   cache.Cache
        csrf    csrf.CSRF
        Flash   *session.Flash
@@ -162,7 +161,6 @@ func Contexter() macaron.Handler {
        return func(c *macaron.Context, l i18n.Locale, cache cache.Cache, sess session.Store, f *session.Flash, x csrf.CSRF) {
                ctx := &Context{
                        Context: c,
-                       Locale:  l,
                        Cache:   cache,
                        csrf:    x,
                        Flash:   f,
index 0522f998033c2ab7a45cf77423ae2ecf37cbea28..41ec4a21417bcd0cd912c0f2de5e71fc4fd0d552 100644 (file)
@@ -92,7 +92,7 @@ func SettingsDelete(ctx *middleware.Context) {
                                ctx.Handle(500, "DeleteOrganization", err)
                        }
                } else {
-                       log.Trace("Organization deleted: %s", ctx.User.Name)
+                       log.Trace("Organization deleted: %s", org.Name)
                        ctx.Redirect(setting.AppSubUrl + "/")
                }
                return