... |
... |
@@ -1,6 +1,6 @@ |
1 |
|
-{{groovy}} |
|
1 |
+{{groovy bindings="tags"}} |
2 |
2 |
def includeTags = tags?.split(',')*.trim()*.toLowerCase().findAll { it } |
3 |
|
-def maxCount = max?.toInteger() ?: 999 |
|
3 |
+def maxCount = 100 |
4 |
4 |
|
5 |
5 |
def hql = """ |
6 |
6 |
select doc.fullName |
... |
... |
@@ -14,8 +14,6 @@ |
14 |
14 |
def results = [] |
15 |
15 |
|
16 |
16 |
docs.each { docName -> |
17 |
|
- if (results.size() >= maxCount) return |
18 |
|
- |
19 |
19 |
def doc = xwiki.getDocument(docName) |
20 |
20 |
def obj = doc.getObject("Main Categories.Anti White Incidents.Code.MoviesClass") |
21 |
21 |
if (!obj) return |
... |
... |
@@ -28,8 +28,8 @@ |
28 |
28 |
if (!title || !summary) return |
29 |
29 |
|
30 |
30 |
if (includeTags && tagList) { |
31 |
|
- def tagNames = tagList.collect { it.toString().toLowerCase() } |
32 |
|
- if (!tagNames.any { includeTags.contains(it) }) return |
|
29 |
+ def docTags = tagList.collect { it.toString().toLowerCase() } |
|
30 |
+ if (!docTags.any { includeTags.contains(it) }) return |
33 |
33 |
} |
34 |
34 |
|
35 |
35 |
def isValidURL = externalURL?.startsWith("http://") || externalURL?.startsWith("https://") |
... |
... |
@@ -60,7 +60,7 @@ |
60 |
60 |
|
61 |
61 |
if (results.isEmpty()) { |
62 |
62 |
if (includeTags) { |
63 |
|
- println "⚠️ No incidents found for tags: ${tags}" |
|
61 |
+ println "⚠️ No incidents found with selected tag(s): ${tags}" |
64 |
64 |
} else { |
65 |
65 |
println "⚠️ No incidents to display." |
66 |
66 |
} |