Skip to content

Commit 8508daf

Browse files
committed
improve
1 parent e8e37c8 commit 8508daf

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

routers/web/repo/issue.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
247247
}
248248

249249
archived := ctx.FormBool("archived")
250-
showArchivedLabels := "false"
251-
if archived {
252-
showArchivedLabels = "true"
253-
}
254250

255251
page := ctx.FormInt("page")
256252
if page <= 1 {
@@ -425,8 +421,8 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
425421
ctx.Data["IssueStats"] = issueStats
426422
ctx.Data["OpenCount"] = issueStats.OpenCount
427423
ctx.Data["ClosedCount"] = issueStats.ClosedCount
428-
ctx.Data["OpenLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=open&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%s", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, showArchivedLabels)
429-
ctx.Data["ClosedLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=closed&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%s", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, showArchivedLabels)
424+
ctx.Data["OpenLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=open&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%t", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, archived)
425+
ctx.Data["ClosedLink"] = fmt.Sprintf("%s?q=%s&type=%s&sort=%s&state=closed&labels=%s&milestone=%d&project=%d&assignee=%d&poster=%d&archived=%t", ctx.Link, keyword, viewType, sortType, selectLabels, mentionedID, projectID, assigneeID, posterID, archived)
430426
ctx.Data["SelLabelIDs"] = labelIDs
431427
ctx.Data["SelectLabels"] = selectLabels
432428
ctx.Data["ViewType"] = viewType

0 commit comments

Comments
 (0)