Browse Source

Fix #181

tags/v1.2.0-rc1
Unknown 11 years ago
parent
commit
5d5c4535cb
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      models/issue.go

+ 4
- 1
models/issue.go View File

@@ -10,6 +10,8 @@ import (
"strings"
"time"

"github.com/go-xorm/xorm"

"github.com/gogits/gogs/modules/base"
)

@@ -281,9 +283,10 @@ const (
func GetIssueStats(rid, uid int64, isShowClosed bool, filterMode int) *IssueStats {
stats := &IssueStats{}
issue := new(Issue)
tmpSess := &xorm.Session{}

sess := orm.Where("repo_id=?", rid)
tmpSess := sess
*tmpSess = *sess
stats.OpenCount, _ = tmpSess.And("is_closed=?", false).Count(issue)
*tmpSess = *sess
stats.ClosedCount, _ = tmpSess.And("is_closed=?", true).Count(issue)


Loading…
Cancel
Save