Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9589e70

Browse files
authored
Merge branch 'main' into mention-user-exists
2 parents 459ce5b + 2c77d4b commit 9589e70

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

modules/markup/markdown/meta.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import (
1010
"unicode"
1111
"unicode/utf8"
1212

13-
"code.gitea.io/gitea/modules/log"
14-
1513
"gopkg.in/yaml.v3"
1614
)
1715

@@ -99,8 +97,6 @@ func ExtractMetadataBytes(contents []byte, out interface{}) ([]byte, error) {
9997
return contents, errors.New("could not determine metadata")
10098
}
10199

102-
log.Info("%s", string(front))
103-
104100
if err := yaml.Unmarshal(front, out); err != nil {
105101
return contents, err
106102
}

routers/web/web.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ func RegisterRoutes(m *web.Route) {
591591
})
592592
}, func(ctx *context.Context) {
593593
ctx.Data["EnableOAuth2"] = setting.OAuth2.Enable
594+
ctx.Data["EnablePackages"] = setting.Packages.Enabled
594595
}, adminReq)
595596
// ***** END: Admin *****
596597

templates/admin/navbar.tmpl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
1313
{{.locale.Tr "admin.repositories"}}
1414
</a>
15-
<a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages">
16-
{{.locale.Tr "packages.title"}}
17-
</a>
15+
{{if .EnablePackages}}
16+
<a class="{{if .PageIsAdminPackages}}active{{end}} item" href="{{AppSubUrl}}/admin/packages">
17+
{{.locale.Tr "packages.title"}}
18+
</a>
19+
{{end}}
1820
{{if not DisableWebhooks}}
1921
<a class="{{if or .PageIsAdminDefaultHooks .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
2022
{{.locale.Tr "admin.hooks"}}

0 commit comments

Comments
 (0)