Remove unnecessary template helper DisableGravatar (#26386)

And one "AllowedUserVisibilityModes" was missing, add it.

Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
wxiaoguang 2023-08-08 16:29:14 +08:00 committed by GitHub
parent 78b2a1cc36
commit 71d253f42e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View file

@ -5,7 +5,6 @@
package templates
import (
"context"
"fmt"
"html"
"html/template"
@ -13,7 +12,6 @@ import (
"strings"
"time"
system_model "code.gitea.io/gitea/models/system"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/emoji"
"code.gitea.io/gitea/modules/markup"
@ -104,9 +102,6 @@ func NewFuncMap() template.FuncMap {
"AssetVersion": func() string {
return setting.AssetVersion
},
"DisableGravatar": func(ctx context.Context) bool {
return system_model.GetSettingWithCacheBool(ctx, system_model.KeyPictureDisableGravatar)
},
"DefaultShowFullName": func() bool {
return setting.UI.DefaultShowFullName
},