forked from forgejo/forgejo
Backport #27245 by @yp05327 Only in org action settings, repo count is missing Before:    In other setting page:  After:    Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
f9395eaa08
commit
0c4f97c112
3 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
shared "code.gitea.io/gitea/routers/web/shared/actions"
|
||||
shared_user "code.gitea.io/gitea/routers/web/shared/user"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -40,6 +41,11 @@ func getVariablesCtx(ctx *context.Context) (*variablesCtx, error) {
|
|||
}
|
||||
|
||||
if ctx.Data["PageIsOrgSettings"] == true {
|
||||
err := shared_user.LoadHeaderCount(ctx)
|
||||
if err != nil {
|
||||
ctx.ServerError("LoadHeaderCount", err)
|
||||
return nil, nil
|
||||
}
|
||||
return &variablesCtx{
|
||||
OwnerID: ctx.ContextUser.ID,
|
||||
IsOrg: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue