Skip to content

Commit d3c5911

Browse files
lafrikslunny
authored andcommitted
Fix wiki page list not rendering after updatedunix changes (#3175)
1 parent 00bfa1d commit d3c5911

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

routers/repo/wiki.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"io/ioutil"
1010
"path/filepath"
1111
"strings"
12-
"time"
1312

1413
"code.gitea.io/git"
1514

@@ -19,6 +18,7 @@ import (
1918
"code.gitea.io/gitea/modules/context"
2019
"code.gitea.io/gitea/modules/markup"
2120
"code.gitea.io/gitea/modules/markup/markdown"
21+
"code.gitea.io/gitea/modules/util"
2222
)
2323

2424
const (
@@ -45,9 +45,9 @@ func MustEnableUncyclo(ctx *context.Context) {
4545

4646
// PageMeta wiki page meat information
4747
type PageMeta struct {
48-
Name string
49-
SubURL string
50-
Updated time.Time
48+
Name string
49+
SubURL string
50+
UpdatedUnix util.TimeStamp
5151
}
5252

5353
// findEntryForFile finds the tree entry for a target filepath.
@@ -266,9 +266,9 @@ func UncycloPages(ctx *context.Context) {
266266
return
267267
}
268268
pages = append(pages, PageMeta{
269-
Name: wikiName,
270-
SubURL: models.UncycloNameToSubURL(wikiName),
271-
Updated: c.Author.When,
269+
Name: wikiName,
270+
SubURL: models.UncycloNameToSubURL(wikiName),
271+
UpdatedUnix: util.TimeStamp(c.Author.When.Unix()),
272272
})
273273
}
274274
ctx.Data["Pages"] = pages

0 commit comments

Comments
 (0)