summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-12-13 15:46:56 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-13 21:46:56 +0800
commitd3c5911ffce8758d020b301e667869aa2e80ce6a (patch)
tree35585279e612bd79ed7fbba88b68b084e2408f18
parent00bfa1d0552c844ba9f2060b24a21d83785c2ff5 (diff)
downloadgitea-d3c5911ffce8758d020b301e667869aa2e80ce6a.tar.gz
gitea-d3c5911ffce8758d020b301e667869aa2e80ce6a.zip
Fix wiki page list not rendering after updatedunix changes (#3175)
-rw-r--r--routers/repo/wiki.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index 7d18a4a49b..8aa9ed8df7 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -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