... |
... |
@@ -1,12 +1,8 @@ |
1 |
|
-{{groovy}} |
2 |
|
-/** |
3 |
|
- * incidentGallery script macro |
4 |
|
- * @param tags - comma-separated tags to filter (case-insensitive) |
5 |
|
- * @param max - max incidents to display (optional) |
6 |
|
- */ |
7 |
|
-def includeTags = tags?.split(',')*.trim()*.toLowerCase() ?: [] |
8 |
|
-def maxCount = max?.toInteger() ?: 999 |
|
1 |
+{{groovy bindings="tags,max"}} |
|
2 |
+def includeTags = (context.macro.params.tags ?: "").split(',')*.trim()*.toLowerCase().findAll { it } // removes blanks |
|
3 |
+def maxCount = context.macro.params.max?.toInteger() ?: 999 |
9 |
9 |
|
|
5 |
+ |
10 |
10 |
def hql = """ |
11 |
11 |
select doc.fullName |
12 |
12 |
from XWikiDocument doc, BaseObject obj |