changeset 2796:feb3c6fca9d4

hitcounts, action.info: bugfix for non existing page and special character in pagename
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 04 Sep 2007 22:14:02 +0200
parents f24afde03048
children 2f8fa491a5c1
files MoinMoin/action/info.py MoinMoin/stats/hitcounts.py
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/info.py	Sun Sep 02 19:33:57 2007 +0200
+++ b/MoinMoin/action/info.py	Tue Sep 04 22:14:02 2007 +0200
@@ -16,9 +16,14 @@
 
 def execute(pagename, request):
     """ show misc. infos about a page """
+    _ = request.getText
     if not request.user.may.read(pagename):
         Page(request, pagename).send_page()
         return
+    
+    if not Page(request, pagename).exists():
+        Page(request, pagename).send_page(msg= _('The page %s does not exist.' % pagename ))
+        return
 
     def general(page, pagename, request):
         _ = request.getText
--- a/MoinMoin/stats/hitcounts.py	Sun Sep 02 19:33:57 2007 +0200
+++ b/MoinMoin/stats/hitcounts.py	Tue Sep 04 22:14:02 2007 +0200
@@ -85,7 +85,7 @@
                 break
             # XXX Bug: event[2].get('pagename') -> u'Aktuelle%C4nderungen' 8(
             eventpage = event[2].get('pagename', '')
-            if filterpage and eventpage != filterpage:
+            if filterpage and wikiutil.url_quote_plus(eventpage) != filterpage:
                 continue
             time_tuple = request.user.getTime(wikiutil.version2timestamp(event[0]))
             day = tuple(time_tuple[0:3])