Bugzilla – Attachment 54719 Details for
Bug 17153
Logging in during a search navigates to account page instead of back to search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17153: Logging in during a search should navigate back to search results
SIGNED-OFF-Bug-17153-Logging-in-during-a-search-sh.patch (text/plain), 2.84 KB, created by
Aleisha Amohia
on 2016-08-22 23:05:48 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17153: Logging in during a search should navigate back to search results
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-08-22 23:05:48 UTC
Size:
2.84 KB
patch
obsolete
>From 716235b310e619485c212737432f9de26072f02d Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Mon, 22 Aug 2016 14:37:54 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 17153: Logging in during a search should > navigate back to search results > >Forces redirect to search results after logging in on opac-search.pl > >To test: >- Perform a catalog or EDS search >- Login from opac-search.pl >- Without the patch, the page should redirect to opac-user.pl >- Log out >- Apply patch >- Perform a search again >- Login again from opac-search.pl >- The page should redirect back to search results > >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > C4/Output.pm | 12 ++++++++++-- > opac/opac-user.pl | 7 ++++++- > 2 files changed, 16 insertions(+), 3 deletions(-) > >diff --git a/C4/Output.pm b/C4/Output.pm >index af7dd5a..6d110cf 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -43,13 +43,13 @@ BEGIN { > %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url > &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], > ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)], >- html =>[qw(&output_with_http_headers &output_html_with_http_headers)] >+ html =>[qw(&output_with_http_headers &output_html_with_http_headers &output_with_redirect)] > ); > push @EXPORT, qw( > setlanguagecookie getlanguagecookie pagination_bar parametrized_url > ); > push @EXPORT, qw( >- &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers >+ &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers &output_with_redirect > ); > > } >@@ -284,6 +284,14 @@ sub output_with_http_headers { > print $query->header($options), $data; > } > >+sub output_with_redirect { >+ my ( $query, $url, $cookie ) = @_; >+ print $query->redirect( >+ -URL => $url, >+ -COOKIE => $cookie, >+ ); >+} >+ > sub output_html_with_http_headers { > my ( $query, $cookie, $data, $status, $extra_options ) = @_; > output_with_http_headers( $query, $cookie, $data, 'html', $status, $extra_options ); >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 0087a6a..266fe22 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -356,4 +356,9 @@ $template->param( > failed_holds => scalar $query->param('failed_holds'), > ); > >-output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >+if ( !$ENV{HTTP_REFERER} =~ /opac-search.pl/ || !$ENV{HTTP_REFERER} =~ /eds-search.pl/ ) { >+ output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >+} >+else { >+ output_with_redirect( $query, $ENV{HTTP_REFERER}, $cookie ); >+} >\ No newline at end of file >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17153
:
54657
|
54715
|
54719
|
54782
|
57549
|
57550
|
75714
|
75933
|
76429
|
76430