rename fields

This commit is contained in:
Unknwon 2015-11-03 22:49:06 -05:00
parent 6f0a41b8b2
commit 3a81fdf092
20 changed files with 67 additions and 46 deletions

View file

@ -88,10 +88,10 @@ func Releases(ctx *middleware.Context) {
tags[i] = &models.Release{
Title: rawTag,
TagName: rawTag,
Sha1: commit.Id.String(),
Sha1: commit.ID.String(),
}
tags[i].NumCommits, err = ctx.Repo.GitRepo.CommitsCount(commit.Id.String())
tags[i].NumCommits, err = ctx.Repo.GitRepo.CommitsCount(commit.ID.String())
if err != nil {
ctx.Handle(500, "CommitsCount", err)
return
@ -190,7 +190,7 @@ func NewReleasePost(ctx *middleware.Context, form auth.NewReleaseForm) {
Title: form.Title,
TagName: form.TagName,
Target: form.Target,
Sha1: commit.Id.String(),
Sha1: commit.ID.String(),
NumCommits: commitsCount,
Note: form.Content,
IsDraft: len(form.Draft) > 0,

View file

@ -317,7 +317,7 @@ func Download(ctx *middleware.Context) {
return
}
archivePath = path.Join(archivePath, base.ShortSha(commit.Id.String())+ext)
archivePath = path.Join(archivePath, base.ShortSha(commit.ID.String())+ext)
if !com.IsFile(archivePath) {
if err := commit.CreateArchive(archivePath, archiveType); err != nil {
ctx.Handle(500, "Download -> CreateArchive "+archivePath, err)
@ -325,5 +325,5 @@ func Download(ctx *middleware.Context) {
}
}
ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+base.ShortSha(commit.Id.String())+ext)
ctx.ServeFile(archivePath, ctx.Repo.Repository.Name+"-"+base.ShortSha(commit.ID.String())+ext)
}

View file

@ -151,7 +151,7 @@ func Home(ctx *middleware.Context) {
ctx.Handle(500, "GetCommitOfRelPath", err)
return
}
files = append(files, []interface{}{te, git.NewSubModuleFile(c, smUrl, te.Id.String())})
files = append(files, []interface{}{te, git.NewSubModuleFile(c, smUrl, te.ID.String())})
}
}
ctx.Data["Files"] = files