mirror of
https://github.com/go-gitea/gitea
synced 2024-11-16 06:51:29 +01:00
Fix wiki page list not rendering after updatedunix changes (#3175)
This commit is contained in:
parent
00bfa1d055
commit
d3c5911ffc
1 changed files with 7 additions and 7 deletions
|
@ -9,7 +9,6 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"code.gitea.io/git"
|
"code.gitea.io/git"
|
||||||
|
|
||||||
|
@ -19,6 +18,7 @@ import (
|
||||||
"code.gitea.io/gitea/modules/context"
|
"code.gitea.io/gitea/modules/context"
|
||||||
"code.gitea.io/gitea/modules/markup"
|
"code.gitea.io/gitea/modules/markup"
|
||||||
"code.gitea.io/gitea/modules/markup/markdown"
|
"code.gitea.io/gitea/modules/markup/markdown"
|
||||||
|
"code.gitea.io/gitea/modules/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -47,7 +47,7 @@ func MustEnableWiki(ctx *context.Context) {
|
||||||
type PageMeta struct {
|
type PageMeta struct {
|
||||||
Name string
|
Name string
|
||||||
SubURL string
|
SubURL string
|
||||||
Updated time.Time
|
UpdatedUnix util.TimeStamp
|
||||||
}
|
}
|
||||||
|
|
||||||
// findEntryForFile finds the tree entry for a target filepath.
|
// findEntryForFile finds the tree entry for a target filepath.
|
||||||
|
@ -268,7 +268,7 @@ func WikiPages(ctx *context.Context) {
|
||||||
pages = append(pages, PageMeta{
|
pages = append(pages, PageMeta{
|
||||||
Name: wikiName,
|
Name: wikiName,
|
||||||
SubURL: models.WikiNameToSubURL(wikiName),
|
SubURL: models.WikiNameToSubURL(wikiName),
|
||||||
Updated: c.Author.When,
|
UpdatedUnix: util.TimeStamp(c.Author.When.Unix()),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ctx.Data["Pages"] = pages
|
ctx.Data["Pages"] = pages
|
||||||
|
|
Loading…
Reference in a new issue