prepend server_dir to remaining redirects

This commit is contained in:
James Valleroy 2013-11-02 11:34:23 +00:00
parent 38d3e84961
commit 77948f0e96
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class AuthController(PagePlugin):
else:
cherrypy.session[cfg.session_key] = cherrypy.request.login = username
self.on_login(username)
raise cherrypy.HTTPRedirect(from_page or "/")
raise cherrypy.HTTPRedirect(from_page or (cfg.server_dir + "/"))
@cherrypy.expose
def logout(self, from_page="/"):
@ -46,4 +46,4 @@ class AuthController(PagePlugin):
if username:
cherrypy.request.login = None
self.on_logout(username)
raise cherrypy.HTTPRedirect(from_page or "/")
raise cherrypy.HTTPRedirect(from_page or (cfg.server_dir + "/"))

View File

@ -19,7 +19,7 @@ class Sharing(PagePlugin):
reflect that we've moved down into the submenu hierarchy.
Otherwise, it's hard to know which menu portion to make active
or expand or contract."""
raise cherrypy.HTTPRedirect('/sharing/files')
raise cherrypy.HTTPRedirect(cfg.server_dir + '/sharing/files')
@cherrypy.expose
@require()