1
0
Fork 0
forked from forgejo/forgejo

Web editor: improve code quality

This commit is contained in:
Unknwon 2016-08-24 21:35:03 -07:00
parent 67fb0fe6a5
commit f8a48ffaad
19 changed files with 75 additions and 81 deletions

View file

@ -25,9 +25,9 @@ const (
func RefCommits(ctx *context.Context) {
switch {
case len(ctx.Repo.TreeName) == 0:
case len(ctx.Repo.TreePath) == 0:
Commits(ctx)
case ctx.Repo.TreeName == "search":
case ctx.Repo.TreePath == "search":
SearchCommits(ctx)
default:
FileHistory(ctx)
@ -104,7 +104,7 @@ func SearchCommits(ctx *context.Context) {
func FileHistory(ctx *context.Context) {
ctx.Data["IsRepoToolbarCommits"] = true
fileName := ctx.Repo.TreeName
fileName := ctx.Repo.TreePath
if len(fileName) == 0 {
Commits(ctx)
return