mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Fix #181
This commit is contained in:
parent
2eee1e9bc2
commit
5d5c4535cb
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/go-xorm/xorm"
|
||||||
|
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -281,9 +283,10 @@ const (
|
||||||
func GetIssueStats(rid, uid int64, isShowClosed bool, filterMode int) *IssueStats {
|
func GetIssueStats(rid, uid int64, isShowClosed bool, filterMode int) *IssueStats {
|
||||||
stats := &IssueStats{}
|
stats := &IssueStats{}
|
||||||
issue := new(Issue)
|
issue := new(Issue)
|
||||||
|
tmpSess := &xorm.Session{}
|
||||||
|
|
||||||
sess := orm.Where("repo_id=?", rid)
|
sess := orm.Where("repo_id=?", rid)
|
||||||
tmpSess := sess
|
*tmpSess = *sess
|
||||||
stats.OpenCount, _ = tmpSess.And("is_closed=?", false).Count(issue)
|
stats.OpenCount, _ = tmpSess.And("is_closed=?", false).Count(issue)
|
||||||
*tmpSess = *sess
|
*tmpSess = *sess
|
||||||
stats.ClosedCount, _ = tmpSess.And("is_closed=?", true).Count(issue)
|
stats.ClosedCount, _ = tmpSess.And("is_closed=?", true).Count(issue)
|
||||||
|
|
Loading…
Reference in a new issue