Attachment 'EventCalendar-099-01.py.patch'
Download 1 --- EventCalendar-099.py 2008-11-05 16:39:43.000000000 +0000
2 +++ EventCalendar.py 2008-11-05 16:40:27.000000000 +0000
3 @@ -156,7 +156,7 @@
4
5 from MoinMoin import wikiutil, config, search, caching
6 from MoinMoin.Page import Page
7 -from MoinMoin.parser import wiki
8 +#from MoinMoin.parser import wiki
9 import re, calendar, time, datetime
10 import codecs, os, urllib, sha
11
12 @@ -1077,9 +1077,9 @@
13 filteredeventkey = 'events_%s-%s' % (datefrom, dateto)
14 caleventkey = 'calevents_%s-%s' % (datefrom, dateto)
15
16 - cache_events = caching.CacheEntry(request, arena, eventkey)
17 - cache_filteredevents = caching.CacheEntry(request, arena, filteredeventkey)
18 - cache_calevents = caching.CacheEntry(request, arena, caleventkey)
19 + cache_events = caching.CacheEntry(request, arena, eventkey,scope='item')
20 + cache_filteredevents = caching.CacheEntry(request, arena, filteredeventkey,scope='item')
21 + cache_calevents = caching.CacheEntry(request, arena, caleventkey,scope='item')
22
23 dirty = 1
24
25 @@ -1396,10 +1396,10 @@
26 pagelistkey = 'eventpages'
27 errmsglistkey = 'eventcalerrormsglist'
28
29 - cache_events = caching.CacheEntry(request, arena, eventkey)
30 - cache_labels = caching.CacheEntry(request, arena, labelkey)
31 - cache_pages = caching.CacheEntry(request, arena, pagelistkey)
32 - cache_errmsglist = caching.CacheEntry(request, arena, errmsglistkey)
33 + cache_events = caching.CacheEntry(request, arena, eventkey,scope='item')
34 + cache_labels = caching.CacheEntry(request, arena, labelkey,scope='item')
35 + cache_pages = caching.CacheEntry(request, arena, pagelistkey,scope='item')
36 + cache_errmsglist = caching.CacheEntry(request, arena, errmsglistkey,scope='item')
37
38 # page list cache
39
40 @@ -1422,10 +1422,10 @@
41 categorypages = searchPages(request, category)
42 for page in categorypages:
43 eventpages.append(page.page_name)
44 - cache_pages.update('\n'.join(eventpages), True)
45 + cache_pages.update('\n'.join(eventpages).encode('utf-8'))
46 debug('New page list is built: %d pages' % len(eventpages))
47 else:
48 - eventpages = cache_pages.content(True).split('\n')
49 + eventpages = cache_pages.content().decode('utf-8').split('\n')
50 debug('Cached page list is used: %d pages' % len(eventpages))
51
52 if not Globs.page_action == 'refresh':
53 @@ -1457,9 +1457,9 @@
54 p = Page(request, page_name)
55 e_ref = page_name
56
57 - cache_errmsg = caching.CacheEntry(request, p, errmsgkey)
58 - cache_eventrecords = caching.CacheEntry(request, p, eventrecordkey)
59 - cache_labelrecords = caching.CacheEntry(request, p, labelrecordkey)
60 + cache_errmsg = caching.CacheEntry(request, p, errmsgkey,scope='item')
61 + cache_eventrecords = caching.CacheEntry(request, p, eventrecordkey,scope='item')
62 + cache_labelrecords = caching.CacheEntry(request, p, labelrecordkey,scope='item')
63
64 if cache_eventrecords.needsUpdate(p._text_filename()) or cache_labelrecords.needsUpdate(p._text_filename()) or Globs.page_action == 'refresh':
65 page_content = p.get_raw_body()
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.