comparison MoinMoin/userprefs/oid.py @ 3234:a739558ca3dc

Page.url() default changed to relative=False
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 10 Mar 2008 00:21:21 +0100
parents a1322262398a
children a82b02396941
comparison
equal deleted inserted replaced
3233:5e120e903ad5 3234:a739558ca3dc
79 return _("No OpenID.") 79 return _("No OpenID.")
80 80
81 qstr = wikiutil.makeQueryString({'action': 'userprefs', 81 qstr = wikiutil.makeQueryString({'action': 'userprefs',
82 'handler': 'oid', 82 'handler': 'oid',
83 'oid.return': '1'}) 83 'oid.return': '1'})
84 return_to = '%s/%s' % (request.getBaseURL(), 84 return_to = request.getQualifiedURL(request.page.url(request, qstr))
85 request.page.url(request, qstr))
86 trust_root = request.getBaseURL() 85 trust_root = request.getBaseURL()
87 if oidreq.shouldSendRedirect(): 86 if oidreq.shouldSendRedirect():
88 redirect_url = oidreq.redirectURL(trust_root, return_to) 87 redirect_url = oidreq.redirectURL(trust_root, return_to)
89 request.http_redirect(redirect_url) 88 request.http_redirect(redirect_url)
90 else: 89 else:
103 for key in request.form: 102 for key in request.form:
104 query[key] = request.form[key][0] 103 query[key] = request.form[key][0]
105 qstr = wikiutil.makeQueryString({'action': 'userprefs', 104 qstr = wikiutil.makeQueryString({'action': 'userprefs',
106 'handler': 'oid', 105 'handler': 'oid',
107 'oid.return': '1'}) 106 'oid.return': '1'})
108 return_to = '%s/%s' % (request.getBaseURL(), 107 return_to = request.getQualifiedURL(request.page.url(request, qstr))
109 request.page.url(request, qstr))
110 info = oidconsumer.complete(query, return_to=return_to) 108 info = oidconsumer.complete(query, return_to=return_to)
111 if info.status == consumer.FAILURE: 109 if info.status == consumer.FAILURE:
112 return _('OpenID error: %s.') % info.message 110 return _('OpenID error: %s.') % info.message
113 elif info.status == consumer.CANCEL: 111 elif info.status == consumer.CANCEL:
114 return _('Verification canceled.') 112 return _('Verification canceled.')