changeset 4565:68d29223dfa9

page.url() should preferably get a query dict, not a query string. It calls wikiutil.makeQueryString() internally.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 10 Feb 2009 13:08:03 +0100
parents 6a287955a262
children 2eaf4b42b400 9da09d8ebb04
files MoinMoin/events/notification.py MoinMoin/userprefs/oid.py
diffstat 2 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/notification.py	Sun Feb 08 20:37:56 2009 +0100
+++ b/MoinMoin/events/notification.py	Tue Feb 10 13:08:03 2009 +0100
@@ -52,8 +52,7 @@
     @param querystr: a dict passed to wikiutil.makeQueryString
 
     """
-    query = wikiutil.makeQueryString(querystr, True)
-    return request.getQualifiedURL(page.url(request, query))
+    return request.getQualifiedURL(page.url(request, querystr))
 
 def page_change_message(msgtype, request, page, lang, **kwargs):
     """Prepare a notification text for a page change of given type
--- a/MoinMoin/userprefs/oid.py	Sun Feb 08 20:37:56 2009 +0100
+++ b/MoinMoin/userprefs/oid.py	Tue Feb 10 13:08:03 2009 +0100
@@ -79,9 +79,9 @@
             if oidreq is None:
                 return 'error', _("No OpenID given.") # ??
 
-            qstr = wikiutil.makeQueryString({'action': 'userprefs',
-                                             'handler': 'oid',
-                                             'oid.return': '1'})
+            qstr = {'action': 'userprefs',
+                    'handler': 'oid',
+                    'oid.return': '1'}
             return_to = request.getQualifiedURL(request.page.url(request, qstr))
             trust_root = request.getBaseURL()
             if oidreq.shouldSendRedirect():
@@ -102,9 +102,9 @@
         query = {}
         for key in request.form:
             query[key] = request.form[key][0]
-        qstr = wikiutil.makeQueryString({'action': 'userprefs',
-                                         'handler': 'oid',
-                                         'oid.return': '1'})
+        qstr = {'action': 'userprefs',
+                'handler': 'oid',
+                'oid.return': '1'}
         return_to = request.getQualifiedURL(request.page.url(request, qstr))
         info = oidconsumer.complete(query, return_to)
         if info.status == consumer.FAILURE: