Bugzilla – Attachment 66251 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: [FOLLOW-UP] Make opac-readingrecord.pl use module
Bug-17896-FOLLOW-UP-Make-opac-readingrecordpl-use-.patch (text/plain), 3.77 KB, created by
Aleisha Amohia
on 2017-08-20 22:09:05 UTC
(
hide
)
Description:
Bug 17896: [FOLLOW-UP] Make opac-readingrecord.pl use module
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-08-20 22:09:05 UTC
Size:
3.77 KB
patch
obsolete
>From acfed96f9a8284963e2495ebfa0e5ca81b03b5e6 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 13 Jun 2017 21:54:05 +0000 >Subject: [PATCH] Bug 17896: [FOLLOW-UP] Make opac-readingrecord.pl use module > >Also fix template to use Koha.Preference instead of passing it from the >pl file >--- > .../bootstrap/en/modules/opac-readingrecord.tt | 6 +++--- > opac/opac-readingrecord.pl | 18 +++--------------- > 2 files changed, 6 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index 4647001..5140221 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -101,7 +101,7 @@ > [% END %] > [% END %] > >- [% IF GoogleJackets %] >+ [% IF ( Koha.Preference('GoogleJackets') ) %] > [% IF issue.normalized_isbn %] > <div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div> > [% ELSE %] >@@ -109,10 +109,10 @@ > [% END %] > [% END %] > >- [% IF BakerTaylorEnabled %] >+ [% IF ( Koha.Preference('BakerTaylorEnabled') ) %] > [% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %] > [% IF ( bt_id ) %] >- <a href="https://[% BakerTaylorBookstoreURL |html %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a> >+ <a href="https://[% Koha.Preference('BakerTaylorBookstoreURL') |html %][% bt_id %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% bt_id %]" /></a> > [% ELSE %] > <span class="no-image">No cover image available</span> > [% END %] >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 8d80ca0..c791eb7 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -20,20 +20,18 @@ use strict; > use warnings; > > use CGI qw ( -utf8 ); >- > use C4::Auth; > use C4::Koha; > use C4::Biblio; > use C4::Circulation; > use C4::Members; >-use Koha::DateUtils; >-use MARC::Record; >- >+use C4::External::BakerTaylor qw(&image_url &link_url); > use C4::Output; > use C4::Charset qw(StripNonXmlChars); > use Koha::Patrons; >- > use Koha::ItemTypes; >+use Koha::DateUtils; >+use MARC::Record; > > my $query = new CGI; > >@@ -124,20 +122,10 @@ foreach my $issue ( @{$issues} ) { > } > } > >-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'), > ); > } > >-- >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