summaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-23 07:38:25 +0800
committerGitHub <noreply@github.com>2023-04-22 19:38:25 -0400
commitd44e1565dadd09b4cdbb924479bf6e59a4d3c403 (patch)
treeeaf824f9bc2477f8a4b119056d2ffd26a672c0f7 /routers/web/web.go
parentf1173d6879cb26af21483037fae72542f3088408 (diff)
downloadgitea-d44e1565dadd09b4cdbb924479bf6e59a4d3c403.tar.gz
gitea-d44e1565dadd09b4cdbb924479bf6e59a4d3c403.zip
Refactor `setting.Other` and remove unused `SHOW_FOOTER_BRANDING` (#24270)
The `SHOW_FOOTER_BRANDING` came from year 2015, and it seems nobody ever uses it. It only shows an GitHub icon which seems unrelated to Gitea, it doesn't do what document says. So, remove it. ## :warning: Breaking Users can now remove the key `[other].SHOW_FOOTER_BRANDING` from their app.ini.
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index fc484eed4c..49ea63b191 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -293,7 +293,7 @@ func RegisterRoutes(m *web.Route) {
}
sitemapEnabled := func(ctx *context.Context) {
- if !setting.EnableSitemap {
+ if !setting.Other.EnableSitemap {
ctx.Error(http.StatusNotFound)
return
}
@@ -307,7 +307,7 @@ func RegisterRoutes(m *web.Route) {
}
feedEnabled := func(ctx *context.Context) {
- if !setting.EnableFeed {
+ if !setting.Other.EnableFeed {
ctx.Error(http.StatusNotFound)
return
}
@@ -706,7 +706,7 @@ func RegisterRoutes(m *web.Route) {
default:
context_service.UserAssignmentWeb()(ctx)
if !ctx.Written() {
- ctx.Data["EnableFeed"] = setting.EnableFeed
+ ctx.Data["EnableFeed"] = setting.Other.EnableFeed
user.Profile(ctx)
}
}
@@ -1205,7 +1205,7 @@ func RegisterRoutes(m *web.Route) {
m.Get(".rss", feedEnabled, repo.TagsListFeedRSS)
m.Get(".atom", feedEnabled, repo.TagsListFeedAtom)
}, func(ctx *context.Context) {
- ctx.Data["EnableFeed"] = setting.EnableFeed
+ ctx.Data["EnableFeed"] = setting.Other.EnableFeed
}, repo.MustBeNotEmpty, reqRepoCodeReader, context.RepoRefByType(context.RepoRefTag, true))
m.Group("/releases", func() {
m.Get("/", repo.Releases)
@@ -1214,7 +1214,7 @@ func RegisterRoutes(m *web.Route) {
m.Get(".rss", feedEnabled, repo.ReleasesFeedRSS)
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
}, func(ctx *context.Context) {
- ctx.Data["EnableFeed"] = setting.EnableFeed
+ ctx.Data["EnableFeed"] = setting.Other.EnableFeed
}, repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true))
m.Get("/releases/attachments/{uuid}", repo.GetAttachment, repo.MustBeNotEmpty, reqRepoReleaseReader)
m.Group("/releases", func() {