From ed67bbe4442cc26fc64102c04d6fbea348f52e7c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 28 Dec 2019 22:43:46 +0800 Subject: Fix repository issues pagination bug when there are more than one label filter (#9512) --- modules/templates/helper.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/templates') diff --git a/modules/templates/helper.go b/modules/templates/helper.go index deaa9526be..c3c92f856b 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -269,6 +269,14 @@ func NewFuncMap() []template.FuncMap { return "" } }, + "contain": func(s []int64, id int64) bool { + for i := 0; i < len(s); i++ { + if s[i] == id { + return true + } + } + return false + }, }} } -- cgit v1.2.3