Bugzilla – Attachment 54782 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]
Bug 17153: Simplified redirect
bug_17153_simplified_redirect.patch (text/plain), 2.35 KB, created by
Lee Jamison
on 2016-08-23 16:04:43 UTC
(
hide
)
Description:
Bug 17153: Simplified redirect
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2016-08-23 16:04:43 UTC
Size:
2.35 KB
patch
obsolete
>From 894e001c5f239242332cde4f33ed0cedf4cf82c8 Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Tue, 23 Aug 2016 11:55:12 -0400 >Subject: [PATCH] Bug 17153: Simplified redirect > >--- > 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..7e25268 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/ ) { >+ 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