aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gogs.go2
-rw-r--r--routers/repo/middlewares.go23
-rw-r--r--routers/repo/view.go9
-rw-r--r--templates/.VERSION2
4 files changed, 11 insertions, 25 deletions
diff --git a/gogs.go b/gogs.go
index 16482ab5..1f4f9359 100644
--- a/gogs.go
+++ b/gogs.go
@@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.9.130.0131"
+const APP_VER = "0.9.131.0201"
func init() {
setting.AppVer = APP_VER
diff --git a/routers/repo/middlewares.go b/routers/repo/middlewares.go
deleted file mode 100644
index 2c344420..00000000
--- a/routers/repo/middlewares.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package repo
-
-import (
- "fmt"
-
- "github.com/gogits/git-module"
- "github.com/gogits/gogs/models"
- "github.com/gogits/gogs/modules/context"
-)
-
-func setEditorconfigIfExists(ctx *context.Context) {
- ec, err := ctx.Repo.GetEditorconfig()
-
- if err != nil && !git.IsErrNotExist(err) {
- description := fmt.Sprintf("Error while getting .editorconfig file: %v", err)
- if err := models.CreateRepositoryNotice(description); err != nil {
- ctx.Handle(500, "ErrCreatingReporitoryNotice", err)
- }
- return
- }
-
- ctx.Data["Editorconfig"] = ec
-}
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 7d9278e7..18c79e08 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -211,6 +211,15 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
}
}
+func setEditorconfigIfExists(ctx *context.Context) {
+ ec, err := ctx.Repo.GetEditorconfig()
+ if err != nil && !git.IsErrNotExist(err) {
+ log.Error(4, "Fail to get '.editorconfig' [%d]: %v", ctx.Repo.Repository.ID, err)
+ return
+ }
+ ctx.Data["Editorconfig"] = ec
+}
+
func Home(ctx *context.Context) {
title := ctx.Repo.Repository.Owner.Name + "/" + ctx.Repo.Repository.Name
if len(ctx.Repo.Repository.Description) > 0 {
diff --git a/templates/.VERSION b/templates/.VERSION
index 4be34e6d..19f82a0d 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.9.130.0131 \ No newline at end of file
+0.9.131.0201 \ No newline at end of file