mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-27 16:59:55 +09:00
Compare commits
2 Commits
v1.16.9
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aa13c585e | ||
|
|
eeaa9250e0 |
@@ -17,6 +17,7 @@ import (
|
|||||||
"code.gitea.io/gitea/models/db"
|
"code.gitea.io/gitea/models/db"
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
"code.gitea.io/gitea/modules/timeutil"
|
"code.gitea.io/gitea/modules/timeutil"
|
||||||
|
"code.gitea.io/gitea/modules/util"
|
||||||
|
|
||||||
"xorm.io/builder"
|
"xorm.io/builder"
|
||||||
)
|
)
|
||||||
@@ -104,6 +105,7 @@ func (label *Label) CalOpenOrgIssues(repoID, labelID int64) {
|
|||||||
counts, _ := CountIssuesByRepo(&IssuesOptions{
|
counts, _ := CountIssuesByRepo(&IssuesOptions{
|
||||||
RepoID: repoID,
|
RepoID: repoID,
|
||||||
LabelIDs: []int64{labelID},
|
LabelIDs: []int64{labelID},
|
||||||
|
IsClosed: util.OptionalBoolFalse,
|
||||||
})
|
})
|
||||||
|
|
||||||
for _, count := range counts {
|
for _, count := range counts {
|
||||||
|
|||||||
@@ -856,10 +856,14 @@ func renderCode(ctx *context.Context) {
|
|||||||
ctx.Data["PageIsViewCode"] = true
|
ctx.Data["PageIsViewCode"] = true
|
||||||
|
|
||||||
if ctx.Repo.Repository.IsEmpty {
|
if ctx.Repo.Repository.IsEmpty {
|
||||||
reallyEmpty, err := ctx.Repo.GitRepo.IsEmpty()
|
reallyEmpty := true
|
||||||
if err != nil {
|
var err error
|
||||||
ctx.ServerError("GitRepo.IsEmpty", err)
|
if ctx.Repo.GitRepo != nil {
|
||||||
return
|
reallyEmpty, err = ctx.Repo.GitRepo.IsEmpty()
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GitRepo.IsEmpty", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if reallyEmpty {
|
if reallyEmpty {
|
||||||
ctx.HTML(http.StatusOK, tplRepoEMPTY)
|
ctx.HTML(http.StatusOK, tplRepoEMPTY)
|
||||||
|
|||||||
Reference in New Issue
Block a user