From: Adam Bowling Date: Wed, 31 Dec 2014 16:47:01 +0000 (-0500) Subject: KPAC Login Redirect Fix X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Frel_2_7_1;p=evergreen%2Fpines.git KPAC Login Redirect Fix Fixes the redirect from the KPAC login to return back to the home page of the KPAC from the /opac/login screen, rather than back to the /opac/home screen, which is the current behavior, and confuses users of the KPAC when they end up back in the OPAC after having logged in. Signed-off-by: Adam Bowling --- diff --git a/Open-ILS/src/templates/opac/parts/login/form.tt2 b/Open-ILS/src/templates/opac/parts/login/form.tt2 index db34682bf6..c96127987a 100644 --- a/Open-ILS/src/templates/opac/parts/login/form.tt2 +++ b/Open-ILS/src/templates/opac/parts/login/form.tt2 @@ -39,6 +39,11 @@ [% redirect = CGI.param('redirect_to'); # Don't use referer unless we got here from elsewhere within the TPAC + IF ctx.kpac_root; + IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.kpac_root); + redirect = ctx.referer; + END; + END; IF !redirect AND ctx.referer.match('^https?://' _ ctx.hostname _ ctx.opac_root); redirect = ctx.referer; END;