mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Remove the "PHP" style formatting function
The "PHP" formatting function doesn't add anything, except an undocumented date format. All usages in the templates have been replaced with DateFmtShort and DateFmtLong for convenience.
This commit is contained in:
@@ -126,8 +126,13 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
|
||||
return a + b
|
||||
},
|
||||
"ActionIcon": ActionIcon,
|
||||
"DateFormat": DateFormat,
|
||||
"List": List,
|
||||
"DateFmtLong": func(t time.Time) string {
|
||||
return t.Format(time.RFC1123Z)
|
||||
},
|
||||
"DateFmtShort": func(t time.Time) string {
|
||||
return t.Format("Jan 02, 2006")
|
||||
},
|
||||
"List": List,
|
||||
"Mail2Domain": func(mail string) string {
|
||||
if !strings.Contains(mail, "@") {
|
||||
return "try.gogs.io"
|
||||
|
Reference in New Issue
Block a user