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.
  • [get | view] (2005-10-31 18:42:02, 65.4 KB) [[attachment:EventCalendar-080.py]]
  • [get | view] (2005-11-22 17:40:26, 55.4 KB) [[attachment:EventCalendar-090.py]]
  • [get | view] (2006-01-15 16:25:08, 57.2 KB) [[attachment:EventCalendar-091.py]]
  • [get | view] (2006-01-17 08:02:06, 75.4 KB) [[attachment:EventCalendar-092.py]]
  • [get | view] (2006-01-18 03:54:33, 75.6 KB) [[attachment:EventCalendar-093.py]]
  • [get | view] (2006-02-25 09:00:17, 74.8 KB) [[attachment:EventCalendar-094-easytime.py]]
  • [get | view] (2006-02-06 04:39:13, 76.2 KB) [[attachment:EventCalendar-094.py]]
  • [get | view] (2006-04-17 13:21:03, 122.7 KB) [[attachment:EventCalendar-096.py]]
  • [get | view] (2006-05-12 15:26:40, 150.6 KB) [[attachment:EventCalendar-098.py]]
  • [get | view] (2008-11-05 16:58:27, 3.2 KB) [[attachment:EventCalendar-099-01.py.patch]]
  • [get | view] (2006-05-23 09:50:33, 152.3 KB) [[attachment:EventCalendar-099.py]]
  • [get | view] (2008-02-14 05:18:57, 1.0 KB) [[attachment:EventCalendar-099.py.patch]]
  • [get | view] (2009-07-15 23:35:13, 151.1 KB) [[attachment:EventCalendar-099a.py]]
  • [get | view] (2013-01-21 02:05:25, 152.4 KB) [[attachment:EventCalendar-099b.py]]
  • [get | view] (2006-11-30 15:51:59, 1.8 KB) [[attachment:defaults-099-01.patch]]
  • [get | view] (2005-10-31 18:35:06, 5.0 KB) [[attachment:eventcal-080.css]]
  • [get | view] (2005-10-31 18:35:01, 11.3 KB) [[attachment:eventcal-080.py]]
  • [get | view] (2005-11-22 17:40:51, 6.8 KB) [[attachment:eventcal-090.css]]
  • [get | view] (2005-11-22 17:40:40, 18.1 KB) [[attachment:eventcal-090.py]]
  • [get | view] (2006-04-17 13:22:09, 8.9 KB) [[attachment:eventcal-096.css]]
  • [get | view] (2006-02-08 02:31:50, 1.4 KB) [[attachment:eventcalendar-094-01.patch]]
  • [get | view] (2006-11-30 15:52:26, 12.2 KB) [[attachment:label_priority-099-01.patch]]
  • [get | view] (2006-11-16 17:06:28, 1.1 KB) [[attachment:pagelinks-099-01.patch]]
  • [get | view] (2006-11-16 17:06:52, 2.9 KB) [[attachment:pagelist-099-01.patch]]
  • [get | view] (2006-03-29 07:37:02, 118.7 KB) [[attachment:snap-daily.jpg]]
  • [get | view] (2006-01-18 03:52:49, 23.2 KB) [[attachment:snap-list.jpg]]
  • [get | view] (2006-01-18 03:52:40, 37.4 KB) [[attachment:snap-monthly.jpg]]
  • [get | view] (2006-03-29 07:35:54, 43.8 KB) [[attachment:snap-simple.jpg]]
  • [get | view] (2006-01-18 03:53:04, 29.4 KB) [[attachment:snap-upcoming.jpg]]
  • [get | view] (2006-03-29 07:36:43, 161.0 KB) [[attachment:snap-weekly.jpg]]
  • [get | view] (2007-06-12 19:51:39, 55.0 KB) [[attachment:time_bug.PNG]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.