Bugzilla – Attachment 58891 Details for
Bug 17896
BakerTaylorEnabled is not plack safe in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17896: Rearranging code in opac-readingrecord.pl so BakerTaylorEnabled works
Bug-17896-Rearranging-code-in-opac-readingrecordpl.patch (text/plain), 1.83 KB, created by
Aleisha Amohia
on 2017-01-13 00:57:52 UTC
(
hide
)
Description:
Bug 17896: Rearranging code in opac-readingrecord.pl so BakerTaylorEnabled works
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-01-13 00:57:52 UTC
Size:
1.83 KB
patch
obsolete
>From 0349556d450ee3ce2625dbf8f96099df3e8dafaa Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 13 Jan 2017 00:56:06 +0000 >Subject: [PATCH] Bug 17896: Rearranging code in opac-readingrecord.pl so > BakerTaylorEnabled works > >To test: >1) Enable BakerTaylorEnabled and attempt to view reading history in OPAC >2) Notice error >3) Apply patch and refresh page >4) Notice error is gone and page works > >Sponsored-by: Catalyst IT >--- > opac/opac-readingrecord.pl | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 47de094..43daf02 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -121,21 +121,21 @@ foreach my $issue ( @{$issues} ) { > } > } > >-if (C4::Context->preference('BakerTaylorEnabled')) { >- $template->param( >- JacketImages=>1, >- BakerTaylorEnabled => 1, >- BakerTaylorImageURL => &image_url(), >- BakerTaylorLinkURL => &link_url(), >- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), >- ); >+BEGIN { >+ if (C4::Context->preference('BakerTaylorEnabled')) { >+ require C4::External::BakerTaylor; >+ import C4::External::BakerTaylor qw(&image_url &link_url); >+ } > } > >-BEGIN { >- if (C4::Context->preference('BakerTaylorEnabled')) { >- require C4::External::BakerTaylor; >- import C4::External::BakerTaylor qw(&image_url &link_url); >- } >+if (C4::Context->preference('BakerTaylorEnabled')) { >+ $template->param( >+ JacketImages => 1, >+ BakerTaylorEnabled => 1, >+ BakerTaylorImageURL => &image_url(), >+ BakerTaylorLinkURL => &link_url(), >+ BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), >+ ); > } > > for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above >-- >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 17896
:
58891
|
64271
|
66251
|
99373
|
99377
|
99378