diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-13 14:49:20 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-13 14:49:20 -0400 |
commit | 5d5c4535cb971f14c2cbde655e7f09d4f6b62eb1 (patch) | |
tree | d17fac253ca2e5a84924868bdad7cfda760c25c4 /models | |
parent | 2eee1e9bc22d77a68b436682fdd4eb8f60fd5d45 (diff) | |
download | gitea-5d5c4535cb971f14c2cbde655e7f09d4f6b62eb1.tar.gz gitea-5d5c4535cb971f14c2cbde655e7f09d4f6b62eb1.zip |
Fix #181
Diffstat (limited to 'models')
-rw-r--r-- | models/issue.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index 213fd1f2ab..dad89f56c4 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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) |