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:
Peter Smit 2015-02-16 14:44:27 +02:00
parent d85366930c
commit 7759b9ee6e
10 changed files with 22 additions and 72 deletions

View file

@ -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"