1.1 --- a/EventAggregatorSupport.py Tue Jul 12 00:01:06 2011 +0200
1.2 +++ b/EventAggregatorSupport.py Wed Aug 10 00:42:18 2011 +0200
1.3 @@ -100,6 +100,15 @@
1.4 category_regexp = re.compile(u'^%s$' % ur'(?P<all>Category(?P<key>(?!Template)\S+))', re.UNICODE)
1.5 return category_regexp
1.6
1.7 +def getWikiDict(pagename, request):
1.8 + if Page(request, pagename).exists() and request.user.may.read(pagename):
1.9 + if hasattr(request.dicts, "dict"):
1.10 + return request.dicts.dict(pagename)
1.11 + else:
1.12 + return request.dicts[pagename]
1.13 + else:
1.14 + return None
1.15 +
1.16 def int_or_none(x):
1.17 if x is None:
1.18 return x
2.1 --- a/macros/EventAggregator.py Tue Jul 12 00:01:06 2011 +0200
2.2 +++ b/macros/EventAggregator.py Wed Aug 10 00:42:18 2011 +0200
2.3 @@ -1515,15 +1515,8 @@
2.4
2.5 # Get the maps and locations.
2.6
2.7 - if request.user.may.read(maps_page):
2.8 - maps = request.dicts.dict(maps_page)
2.9 - else:
2.10 - maps = None
2.11 -
2.12 - if request.user.may.read(locations_page):
2.13 - locations = request.dicts.dict(locations_page)
2.14 - else:
2.15 - locations = None
2.16 + maps = getWikiDict(maps_page, request)
2.17 + locations = getWikiDict(locations_page, request)
2.18
2.19 # Get the map image definition.
2.20