changeset 1017:2408963718c8

fix scope for single-page hitcounts
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 23 Jul 2006 22:57:19 +0200
parents 8b196cdb11e8
children f5b796658f93
files MoinMoin/stats/hitcounts.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/stats/hitcounts.py	Sun Jul 23 22:53:26 2006 +0200
+++ b/MoinMoin/stats/hitcounts.py	Sun Jul 23 22:57:19 2006 +0200
@@ -47,16 +47,17 @@
 
 
 def get_data(pagename, request, filterpage=None):
+    cache_days, cache_views, cache_edits = [], [], []
+    cache_date = 0
 
     # Get results from cache
     if filterpage:
         arena = Page(request, pagename)
+        cache = caching.CacheEntry(request, arena, 'hitcounts', scope='item')
     else:
         arena = 'charts'
+        cache = caching.CacheEntry(request, arena, 'hitcounts', scope='wiki')
 
-    cache_days, cache_views, cache_edits = [], [], []
-    cache_date = 0
-    cache = caching.CacheEntry(request, arena, 'hitcounts', scope='wiki')
     if cache.exists():
         try:
             cache_date, cache_days, cache_views, cache_edits = eval(cache.content())