Skip to content

Commit

Permalink
Fix wiki page list not rendering after updatedunix changes (go-gitea#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks authored and lunny committed Dec 13, 2017
1 parent 00bfa1d commit d3c5911
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions routers/repo/wiki.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"io/ioutil"
"path/filepath"
"strings"
"time"

"code.gitea.io/git"

Expand All @@ -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 (
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d3c5911

Please sign in to comment.