1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

fix naming

This commit is contained in:
Unknwon 2015-08-05 11:18:24 +08:00
parent 9311a9858a
commit ce4dcf1e83
2 changed files with 9 additions and 9 deletions

View File

@ -704,8 +704,8 @@ func GetMilestoneByIndex(repoId, idx int64) (*Milestone, error) {
return m, nil
}
// Milestones returns a list of milestones of given repository and status.
func Milestones(repoID int64, page int, isClosed bool) ([]*Milestone, error) {
// GetMilestones returns a list of milestones of given repository and status.
func GetMilestones(repoID int64, page int, isClosed bool) ([]*Milestone, error) {
miles := make([]*Milestone, 0, setting.IssuePagingNum)
sess := x.Where("repo_id=? AND is_closed=?", repoID, isClosed)
if page > 0 {

View File

@ -176,12 +176,12 @@ func CreateIssue(ctx *middleware.Context) {
err error
)
// Get all milestones.
ctx.Data["OpenMilestones"], err = models.Milestones(repo.Id, -1, false)
ctx.Data["OpenMilestones"], err = models.GetMilestones(repo.Id, -1, false)
if err != nil {
ctx.Handle(500, "GetMilestones.1: %v", err)
return
}
ctx.Data["ClosedMilestones"], err = models.Milestones(repo.Id, -1, true)
ctx.Data["ClosedMilestones"], err = models.GetMilestones(repo.Id, -1, true)
if err != nil {
ctx.Handle(500, "GetMilestones.2: %v", err)
return
@ -220,12 +220,12 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
var err error
// Get all milestones.
_, err = models.Milestones(ctx.Repo.Repository.Id, -1, false)
_, err = models.GetMilestones(ctx.Repo.Repository.Id, -1, false)
if err != nil {
send(500, nil, err)
return
}
_, err = models.Milestones(ctx.Repo.Repository.Id, -1, true)
_, err = models.GetMilestones(ctx.Repo.Repository.Id, -1, true)
if err != nil {
send(500, nil, err)
return
@ -385,12 +385,12 @@ func ViewIssue(ctx *middleware.Context) {
}
// Get all milestones.
ctx.Data["OpenMilestones"], err = models.Milestones(ctx.Repo.Repository.Id, -1, false)
ctx.Data["OpenMilestones"], err = models.GetMilestones(ctx.Repo.Repository.Id, -1, false)
if err != nil {
ctx.Handle(500, "issue.ViewIssue(GetMilestones.1): %v", err)
return
}
ctx.Data["ClosedMilestones"], err = models.Milestones(ctx.Repo.Repository.Id, -1, true)
ctx.Data["ClosedMilestones"], err = models.GetMilestones(ctx.Repo.Repository.Id, -1, true)
if err != nil {
ctx.Handle(500, "issue.ViewIssue(GetMilestones.2): %v", err)
return
@ -988,7 +988,7 @@ func Milestones(ctx *middleware.Context) {
}
ctx.Data["Page"] = paginater.New(total, setting.IssuePagingNum, page, 5)
miles, err := models.Milestones(ctx.Repo.Repository.Id, page, isShowClosed)
miles, err := models.GetMilestones(ctx.Repo.Repository.Id, page, isShowClosed)
if err != nil {
ctx.Handle(500, "GetMilestones", err)
return