changeset 3137:ee546a8aaa8f

apparently it is possible that request.page is None, fix auth
author Johannes Berg <johannes AT sipsolutions DOT net>
date Wed, 27 Feb 2008 15:28:29 +0100
parents f272fc54b68d
children 2ba284b78861
files MoinMoin/auth/__init__.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/auth/__init__.py	Wed Feb 27 15:10:14 2008 +0100
+++ b/MoinMoin/auth/__init__.py	Wed Feb 27 15:28:29 2008 +0100
@@ -146,7 +146,11 @@
               'login': '1',
               'stage': auth_name}
     fields.update(extra_fields)
-    return request.page.url(request, querystr=fields, relative=False)
+    if request.page:
+        return request.page.url(request, querystr=fields, relative=False)
+    else:
+        qstr = wikiutil.makeQueryString(fields)
+        return ''.join([request.getBaseURL(), '?', qstr])
 
 
 class LoginReturn(object):