Attachment 'exclude-category.patch'
Download 1 diff -r a53e20c3ebab MoinMoin/search/queryparser.py
2 --- a/MoinMoin/search/queryparser.py Fri Jul 11 13:04:13 2008 +0200
3 +++ b/MoinMoin/search/queryparser.py Sat Jul 12 13:05:14 2008 +0100
4 @@ -1022,6 +1022,14 @@
5
6 text = item[0]
7 if category:
8 + # Prevent CategoryTemplate from being a member of any category.
9 + # This is because CategoryTemplate is a template, *not* a category.
10 + # http://moinmo.in/MoinMoinBugs/CategoryTemplateIsTemplateOrCategory
11 + ignore_template = TitleSearch('^CategoryTemplate$', use_re=True, case=True)
12 + ignore_template.negated = True
13 + logging.info('adding %s to query' % (ignore_template))
14 + terms.append(ignore_template)
15 +
16 obj = CategorySearch(text, use_re=regex, case=case)
17 elif mimetype:
18 obj = MimetypeSearch(text, use_re=regex, case=False)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.