From d8c58e5f5d6b149dfd5562e554c6fc0d41555a07 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 25 Jul 2008 17:05:13 -0700 Subject: [PATCH] Fixed a bug where clicking the link for an updated note in an RSS feed did not properly redirect to that note after login. --- NEWS | 4 ++++ controller/Users.py | 2 +- static/js/Wiki.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0f6c49a..5069848 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +1.4.18: ??? + * Fixed a bug where clicking the link for an updated note in an RSS feed did + not properly redirect to that note after login. + 1.4.17: July 24, 2008: * Updated the product tour with an analogy to index cards. diff --git a/controller/Users.py b/controller/Users.py index 904c2d6..1714533 100644 --- a/controller/Users.py +++ b/controller/Users.py @@ -140,7 +140,7 @@ def grab_user_id( function ): if cherrypy.session.get( "user_id" ) is None and cherrypy.request.method == "GET": original_path = cherrypy.request.path + \ ( cherrypy.request.query_string and u"?%s" % cherrypy.request.query_string or "" ) - raise cherrypy.HTTPRedirect( u"/login?after_login=%s" % urllib.quote( original_path ) ) + raise cherrypy.HTTPRedirect( u"%s/login?after_login=%s" % ( cherrypy.request.base, urllib.quote( original_path ) ) ) else: raise diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 7a5ec11..7a29e9d 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -1544,6 +1544,7 @@ Wiki.prototype.submit_form = function ( form ) { args[ "yearly" ] = this.yearly; } else if ( url == "/users/login" ) { args[ "invite_id" ] = this.invite_id; + args[ "after_login" ] = this.after_login; } else if ( url == "/users/send_invites" ) { callback = function ( result ) { if ( !result.invites ) return;