mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
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.
## ⚠️ Breaking
Users can now remove the key `[other].SHOW_FOOTER_BRANDING` from their
app.ini.
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user