Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 12:46:09 +01:00

Fix wiki page list not rendering after updatedunix changes (#3175)

This commit is contained in:
Lauris BH 2017-12-13 15:46:56 +02:00 committed by Lunny Xiao
parent 00bfa1d055
commit d3c5911ffc

View file

@ -9,7 +9,6 @@ import (
"io/ioutil"
"path/filepath"
"strings"
"time"
"code.gitea.io/git"
@ -19,6 +18,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/util"
)
const (
@ -45,9 +45,9 @@ func MustEnableWiki(ctx *context.Context) {
// PageMeta wiki page meat information
type PageMeta struct {
Name string
SubURL string
Updated time.Time
Name string
SubURL string
UpdatedUnix util.TimeStamp
}
// findEntryForFile finds the tree entry for a target filepath.
@ -266,9 +266,9 @@ func WikiPages(ctx *context.Context) {
return
}
pages = append(pages, PageMeta{
Name: wikiName,
SubURL: models.WikiNameToSubURL(wikiName),
Updated: c.Author.When,
Name: wikiName,
SubURL: models.WikiNameToSubURL(wikiName),
UpdatedUnix: util.TimeStamp(c.Author.When.Unix()),
})
}
ctx.Data["Pages"] = pages