diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-03-31 11:03:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 03:03:24 +0000 |
commit | 6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6 (patch) | |
tree | 27e4c5f4991d3d4fc8b35456c9f19a49ad275e64 /routers | |
parent | 82ffd91607ba03907ebad31ec9a38555b153a331 (diff) | |
download | gitea-6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6.tar.gz gitea-6d34ce25b16cdfd6e2e364aebe546e3c2fbb76c6.zip |
Do not allow different storage configurations to point to the same directory (#30169)
Replace #29171
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/admin/admin.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/web/admin/admin.go b/routers/web/admin/admin.go index f3f10fd1b8..4dc0dfdef8 100644 --- a/routers/web/admin/admin.go +++ b/routers/web/admin/admin.go @@ -190,6 +190,14 @@ func DashboardPost(ctx *context.Context) { func SelfCheck(ctx *context.Context) { ctx.Data["PageIsAdminSelfCheck"] = true + + ctx.Data["DeprecatedWarnings"] = setting.DeprecatedWarnings + if len(setting.DeprecatedWarnings) == 0 && !setting.IsProd { + if time.Now().Unix()%2 == 0 { + ctx.Data["DeprecatedWarnings"] = []string{"This is a test warning message in dev mode"} + } + } + r, err := db.CheckCollationsDefaultEngine() if err != nil { ctx.Flash.Error(fmt.Sprintf("CheckCollationsDefaultEngine: %v", err), true) |