View | Details | Raw Unified | Return to bug 41479
Collapse All | Expand All

(-)a/C4/External/BakerTaylor.pm (-169 lines)
Lines 1-169 Link Here
1
package C4::External::BakerTaylor;
2
3
# Copyright (C) 2008 LibLime
4
# <jmf at liblime dot com>
5
#
6
# This file is part of Koha.
7
#
8
# Koha is free software; you can redistribute it and/or modify it
9
# under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 3 of the License, or
11
# (at your option) any later version.
12
#
13
# Koha is distributed in the hope that it will be useful, but
14
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
17
#
18
# You should have received a copy of the GNU General Public License
19
# along with Koha; if not, see <https://www.gnu.org/licenses>.
20
21
use Modern::Perl;
22
use base 'Exporter';
23
24
BEGIN {
25
    our @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
26
}
27
28
use XML::Simple;
29
use LWP::Simple qw( get );
30
31
use C4::Context;
32
33
use vars qw(%EXPORT_TAGS $VERSION);
34
35
BEGIN {
36
    $VERSION = 3.07.00.049;
37
}
38
39
# These variables are plack safe: they are initialized each time
40
my ( $user, $pass, $agent, $image_url, $link_url );
41
42
sub _initialize {
43
    $user     = ( @_ ? shift : C4::Context->preference('BakerTaylorUsername') ) || '';    # LL17984
44
    $pass     = ( @_ ? shift : C4::Context->preference('BakerTaylorPassword') ) || '';    # CC82349
45
    $link_url = ( @_ ? shift : C4::Context->preference('BakerTaylorBookstoreURL') );
46
    $image_url =
47
        "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$user&Password=$pass&Options=Y&Return=T&Type=S&Value=";
48
    $agent = "Koha/$VERSION [en] (Linux)";
49
50
    #"Mozilla/4.76 [en] (Win98; U)",    #  if for some reason you want to go stealth, you might prefer this
51
}
52
53
sub image_url {
54
    _initialize();
55
    ( $user and $pass ) or return;
56
    my $isbn = ( @_ ? shift : '' );
57
    $isbn =~ s/(p|-)//g;    # sanitize
58
    return $image_url . $isbn;
59
}
60
61
sub link_url {
62
    _initialize();
63
    my $isbn = ( @_ ? shift : '' );
64
    $isbn =~ s/(p|-)//g;    # sanitize
65
    $link_url or return;
66
    return $link_url . $isbn;
67
}
68
69
sub content_cafe_url {
70
    _initialize();
71
    ( $user and $pass ) or return;
72
    my $isbn = ( @_ ? shift : '' );
73
    $isbn =~ s/(p|-)//g;    # sanitize
74
    return
75
        "https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$user&Password=$pass&Options=Y&ItemKey=$isbn";
76
}
77
78
sub http_jacket_link {
79
    _initialize();
80
    my $isbn = shift or return;
81
    $isbn =~ s/(p|-)//g;    # sanitize
82
    my $image = availability($isbn);
83
    my $alt   = "Buy this book";
84
    $image and $image = qq(<img class="btjacket" alt="$alt" src="$image" />);
85
    my $link = &link_url($isbn);
86
    unless ($link) { return $image || ''; }
87
    return sprintf qq(<a class="btlink" href="%s">%s</a>), $link, ( $image || $alt );
88
}
89
90
sub availability {
91
    _initialize();
92
    my $isbn = shift    or return;
93
    ( $user and $pass ) or return;
94
    $isbn =~ s/(p|-)//g;    # sanitize
95
    my $url =
96
        "https://contentcafe2.btol.com/ContentCafe/InventoryAvailability.asmx/CheckInventory?UserID=$user&Password=$pass&Value=$isbn";
97
    my $content = get($url);
98
    warn "could not retrieve $url" unless $content;
99
    my $xmlsimple = XML::Simple->new();
100
    my $result    = $xmlsimple->XMLin($content);
101
102
    if ( $result->{Error} ) {
103
        warn "Error returned to " . __PACKAGE__ . " : " . $result->{Error};
104
    }
105
    my $avail = $result->{Availability};
106
    return ( $avail and $avail !~ /^false$/i ) ? &image_url($isbn) : 0;
107
}
108
109
1;
110
111
__END__
112
113
=head1 NAME
114
115
C4::External::BakerTaylor
116
117
=head1 DESCRIPTION
118
119
Functions for retrieving content from Baker and Taylor, inventory availability and "Content Cafe".
120
121
The settings for this module are controlled by System Preferences:
122
123
These can be overridden for testing purposes using the initialize function.
124
125
=head1 FUNCTIONS
126
127
=head2 image_url
128
129
Missing POD for image_url.
130
131
=head2 link_url
132
133
Missing POD for link_url.
134
135
=head2 content_cafe_url
136
137
Missing POD for content_cafe_url.
138
139
=head2 http_jacket_link
140
141
Missing POD for http_jacket_link.
142
143
=head2 availability($isbn);
144
145
$isbn is a isbn string
146
147
=head1 NOTES
148
149
A request with failed authentication might see this back from Baker + Taylor: 
150
151
 <?xml version="1.0" encoding="utf-8"?>
152
 <InventoryAvailability xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" DateTime="2008-03-07T22:01:25.6520429-05:00" xmlns="http://ContentCafe2.btol.com">
153
   <Key Type="Undefined">string</Key>
154
   <Availability>false</Availability>
155
   <Error>Invalid UserID</Error>
156
 </InventoryAvailability>
157
158
Such response will trigger a warning for each request (potentially many).  Point being, do not leave this module configured with incorrect username and password in production.
159
160
=head1 SEE ALSO
161
162
LWP::UserAgent
163
164
=head1 AUTHOR
165
166
Joe Atzberger
167
atz AT liblime DOT com
168
169
=cut
(-)a/C4/UsageStats.pm (-1 lines)
Lines 236-242 sub _shared_preferences { Link Here
236
        AmazonCoverImages
236
        AmazonCoverImages
237
        OPACAmazonCoverImages
237
        OPACAmazonCoverImages
238
        Babeltheque
238
        Babeltheque
239
        BakerTaylorEnabled
240
        GoogleJackets
239
        GoogleJackets
241
        HTML5MediaEnabled
240
        HTML5MediaEnabled
242
        LibraryThingForLibrariesEnabled
241
        LibraryThingForLibrariesEnabled
(-)a/installer/data/mysql/atomicupdate/bug_41479.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "41479",
5
    description =>
6
        "Remove system preferences BakerTaylorBookstoreURL, BakerTaylorEnabled, BakerTaylorPassword, BakerTaylorUsername",
7
    up => sub {
8
        my ($args) = @_;
9
        my $dbh = $args->{dbh};
10
11
        $dbh->do(
12
            q{ DELETE FROM systempreferences WHERE variable IN ('BakerTaylorBookstoreURL', 'BakerTaylorEnabled', 'BakerTaylorPassword', 'BakerTaylorUsername')}
13
        );
14
    },
15
    }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-4 lines)
Lines 114-123 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
114
('Babeltheque','0',NULL,'Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','YesNo'),
114
('Babeltheque','0',NULL,'Turn ON Babeltheque content - See babeltheque.com to subscribe to this service','YesNo'),
115
('Babeltheque_url_js','',NULL,'Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
115
('Babeltheque_url_js','',NULL,'Url for Babeltheque javascript (e.g. http://www.babeltheque.com/bw_XX.js)','Free'),
116
('Babeltheque_url_update','',NULL,'Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
116
('Babeltheque_url_update','',NULL,'Url for Babeltheque update (E.G. http://www.babeltheque.com/.../file.csv.bz2)','Free'),
117
('BakerTaylorBookstoreURL','',NULL,'URL template for "My Libary Bookstore" links, to which the "key" value is appended, and "https://" is prepended.  It should include your hostname and "Parent Number".  Make this variable empty to turn MLB links off.  Example: ocls.mylibrarybookstore.com/MLB/actions/searchHandler.do?nextPage=bookDetails&parentNum=10923&key=',''),
118
('BakerTaylorEnabled','0',NULL,'Enable or disable all Baker & Taylor features.','YesNo'),
119
('BakerTaylorPassword','',NULL,'Baker & Taylor Password for Content Cafe (external content)','Free'),
120
('BakerTaylorUsername','',NULL,'Baker & Taylor Username for Content Cafe (external content)','Free'),
121
('BarcodeSeparators','\\s\\r\\n',NULL,'Splitting characters for barcodes','Free'),
117
('BarcodeSeparators','\\s\\r\\n',NULL,'Splitting characters for barcodes','Free'),
122
('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'),
118
('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'),
123
('BatchCheckouts','0',NULL,'Enable or disable batch checkouts','YesNo'),
119
('BatchCheckouts','0',NULL,'Enable or disable batch checkouts','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced_content.pref (-20 lines)
Lines 64-89 Enhanced content: Link Here
64
            - pref: Babeltheque_url_update
64
            - pref: Babeltheque_url_update
65
              class: url
65
              class: url
66
            - (e.g. http://www.babeltheque.com/.../file.csv.bz2).
66
            - (e.g. http://www.babeltheque.com/.../file.csv.bz2).
67
    Baker and Taylor:
68
        -
69
            - pref: BakerTaylorEnabled
70
              choices:
71
                  1: Add
72
                  0: "Don't add"
73
            - Baker and Taylor links and cover images to the OPAC and staff interface. This requires that you have entered in a username and password (which can be seen in image links).
74
        -
75
            - 'Baker and Taylor "My Library Bookstore" links should be accessed at <code>https://'
76
            - pref: BakerTaylorBookstoreURL
77
              class: url
78
            - <em>isbn</em></code> (this should be filled in with something like <code>ocls.mylibrarybookstore.com/MLB/actions/searchHandler.do?nextPage=bookDetails&amp;parentNum=10923&amp;key=</code>). Leave it blank to disable these links.
79
        -
80
            - Access Baker and Taylor using username
81
            - pref: BakerTaylorUsername
82
              class: password
83
            - and password
84
            - pref: BakerTaylorPassword
85
              class: password
86
            - .
87
    Novelist Select:
67
    Novelist Select:
88
        -
68
        -
89
            - pref: NovelistSelectEnabled
69
            - pref: NovelistSelectEnabled
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/cover-images.inc (-16 lines)
Lines 81-102 Link Here
81
            </div>
81
            </div>
82
        [% END %]
82
        [% END %]
83
83
84
        [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
85
        [% IF ( BakerTaylorEnabled && bt_id ) %]
86
            <div class="cover-image bakertaylor-coverimg">
87
                [% IF BakerTaylorBookstoreURL %]
88
                    <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
89
                        <img alt="See Baker &amp; Taylor" id="bakertaylor-thumbnail-[% SEARCH_RESULT.biblionumber | html %]" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
90
                    </a>
91
                [% ELSE %]
92
                    <a href="[% BakerTaylorImageURL | url %][% bt_id | uri %]">
93
                        <img alt="See Baker &amp; Taylor" id="bakertaylor-thumbnail-[% SEARCH_RESULT.biblionumber | html %]" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
94
                    </a>
95
                [% END %]
96
                <div class="hint">Image from Baker &amp; Taylor</div>
97
            </div>
98
        [% END %]
99
100
        [% IF OPACCustomCoverImages %]
84
        [% IF OPACCustomCoverImages %]
101
            [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
85
            [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
102
            [% IF custom_cover_image_url %]
86
            [% IF custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-9 lines)
Lines 159-173 Link Here
159
    [% Asset.js("js/localcovers.js") | $raw %]
159
    [% Asset.js("js/localcovers.js") | $raw %]
160
[% END %]
160
[% END %]
161
161
162
[% IF ( BakerTaylorEnabled ) %]
163
    [% Asset.js("js/bakertaylorimages.js") | $raw %]
164
    <script>
165
        $(window).load(function () {
166
            bt_verify_images();
167
        });
168
    </script>
169
[% END %]
170
171
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
162
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
172
    <script>
163
    <script>
173
        $("#news-branch-select").change(function () {
164
        $("#news-branch-select").change(function () {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc (-9 / +1 lines)
Lines 32-38 Link Here
32
                                [% img_title = item.biblionumber %]
32
                                [% img_title = item.biblionumber %]
33
                            [% END %]
33
                            [% END %]
34
34
35
                            [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || BakerTaylorEnabled || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %]
35
                            [% IF ( OPACLocalCoverImages || OPACAmazonCoverImages || ( SyndeticsEnabled && SyndeticsCoverImages ) || GoogleJackets || ( Koha.Preference('OpacCoce') && Koha.Preference('CoceProviders') ) || ( Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') ) ) %]
36
                                <a
36
                                <a
37
                                    class="shelfbrowser_cover"
37
                                    class="shelfbrowser_cover"
38
                                    href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser"
38
                                    href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% item.biblionumber | uri %]&amp;shelfbrowse_itemnumber=[% item.itemnumber | uri %]#shelfbrowser"
Lines 73-86 Link Here
73
                                        [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
73
                                        [% coce_id = item.browser_normalized_ean || item.browser_normalized_isbn | html %]
74
                                        <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
74
                                        <div title="[% img_title | html %]" class="[% coce_id | html %]" id="coce-thumbnail-preview-[% coce_id | html %]"></div>
75
                                    [% END %]
75
                                    [% END %]
76
                                    [% IF ( BakerTaylorEnabled ) %]
77
                                        [% bt_id = ( item.browser_normalized_upc || item.browser_normalized_isbn ) | html %]
78
                                        [% IF ( bt_id ) %]
79
                                            <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" />
80
                                        [% ELSE %]
81
                                            <span class="no-image">No cover image available</span>
82
                                        [% END %]
83
                                    [% END %]
84
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
76
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
85
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
77
                                        [% SET custom_cover_image_url = item.biblio_object.custom_cover_image_url %]
86
                                        [% IF custom_cover_image_url %]
78
                                        [% IF custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-25 lines)
Lines 148-169 Link Here
148
                                </div>
148
                                </div>
149
                            [% END %]
149
                            [% END %]
150
150
151
                            [% bt_id = ( normalized_upc || normalized_isbn ) %]
152
                            [% IF ( BakerTaylorEnabled && bt_id ) %]
153
                                <div class="cover-image" id="bakertaylor-coverimg">
154
                                    [% IF BakerTaylorBookstoreURL %]
155
                                        <a href="https://[% BakerTaylorBookstoreURL | url %][% bt_id | url %]">
156
                                            <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
157
                                        </a>
158
                                    [% ELSE %]
159
                                        <a href="[% BakerTaylorImageURL | url %][% bt_id | uri %]">
160
                                            <img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | url %][% bt_id | uri %]" />
161
                                        </a>
162
                                    [% END %]
163
                                    <div class="hint">Image from Baker &amp; Taylor</div>
164
                                </div>
165
                            [% END %]
166
167
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
151
                            [% IF Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %]
168
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
152
                                [% SET custom_cover_image_url = biblio.custom_cover_image_url %]
169
                                [% IF custom_cover_image_url %]
153
                                [% IF custom_cover_image_url %]
Lines 405-417 Link Here
405
                        </form>
389
                        </form>
406
                    [% END # / IF OpacStarRatings != 'disable' %]
390
                    [% END # / IF OpacStarRatings != 'disable' %]
407
391
408
                    [% IF ( BakerTaylorContentURL ) %]
409
                        <span class="results_summary">
410
                            <span class="label">Enhanced content: </span>
411
                            [% IF ( OPACURLOpenInNewWindow ) %]<a href="[% BakerTaylorContentURL | url %]" target="_blank" rel="noreferrer">Content Cafe</a>[% ELSE %]<a href="[% BakerTaylorContentURL | url %]">Content Cafe</a>[% END %]
412
                        </span>
413
                    [% END # / IF BakerTaylorContentURL %]
414
415
                    [% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %]
392
                    [% IF ( NovelistSelectProfile && (normalized_isbn || normalized_upc) ) %]
416
                        [% IF ( NovelistSelectView == 'above') %]
393
                        [% IF ( NovelistSelectView == 'above') %]
417
                            <span class="results_summary NovelistSelect" style="display:none;">
394
                            <span class="results_summary NovelistSelect" style="display:none;">
Lines 1742-1749 Link Here
1742
                                }
1719
                                }
1743
                                div.find(".hint").html(coce_description);
1720
                                div.find(".hint").html(coce_description);
1744
                                lightbox_descriptions.push(coce_description);
1721
                                lightbox_descriptions.push(coce_description);
1745
                            } else if ( div.attr("id") == "bakertaylor-coverimg" ){
1746
                                lightbox_descriptions.push(_("Image from Baker &amp; Taylor"));
1747
                            } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1722
                            } else if ( div.attr("class") == "cover-image local-coverimg" ) {
1748
                                lightbox_descriptions.push(_("Local cover image"));
1723
                                lightbox_descriptions.push(_("Local cover image"));
1749
                            } else {
1724
                            } else {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt (-12 lines)
Lines 80-91 Link Here
80
                                        [% END %]
80
                                        [% END %]
81
                                    [% END %]
81
                                    [% END %]
82
                                [% END %]
82
                                [% END %]
83
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
84
                                [% IF ( BakerTaylorEnabled ) %]
85
                                    [% IF bt_id %]
86
                                        <![CDATA[ <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a> ]]>
87
                                    [% END %]
88
                                [% END %]
89
83
90
                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
84
                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
91
                                    [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
85
                                    [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
Lines 192-203 Link Here
192
                                        [% END %]
186
                                        [% END %]
193
                                    [% END %]
187
                                    [% END %]
194
                                [% END %]
188
                                [% END %]
195
                                [% bt_id = ( SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_isbn ) %]
196
                                [% IF ( BakerTaylorEnabled ) %]
197
                                    [% IF bt_id %]
198
                                        <a href="https://[% BakerTaylorBookstoreURL |url %][% bt_id | uri %]"><img alt="See Baker &#38; Taylor" src="[% BakerTaylorImageURL |url %][% bt_id | uri %]" /></a>
199
                                    [% END %]
200
                                [% END %]
201
189
202
                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
190
                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
203
                                    [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
191
                                    [% SET custom_cover_image_url = SEARCH_RESULT.biblio_object.custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt (-12 / +1 lines)
Lines 164-182 Link Here
164
                            [% END %]
164
                            [% END %]
165
                        [% END %]
165
                        [% END %]
166
166
167
                        [% IF Koha.Preference( "BakerTaylorEnabled" ) || Koha.Preference( "SyndeticsEnabled" ) && Koha.Preference( "SyndeticsCoverImages" ) %]
167
                        [% IF Koha.Preference( "SyndeticsEnabled" ) && Koha.Preference( "SyndeticsCoverImages" ) %]
168
                            [% SET normalized_upc = biblio.normalized_upc %]
168
                            [% SET normalized_upc = biblio.normalized_upc %]
169
                        [% END %]
170
                        [% IF Koha.Preference( "BakerTaylorEnabled" ) %]
171
                            [% bt_id = ( normalized_upc || normalized_isbn ) %]
172
                            [% IF ( bt_id ) %]
173
                                <a href="https://[% Koha.Preference( "BakerTaylorBookstoreURL" ) | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
174
                            [% ELSE %]
175
                                <span class="no-image">No cover image available</span>
176
                            [% END %]
177
                        [% END %]
178
179
                        [% IF SyndeticsEnabled && SyndeticsCoverImages %]
180
                            <img
169
                            <img
181
                                src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% normalized_upc | html %]&amp;oclc=[% biblio.normalized_oclc | html %]"
170
                                src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% normalized_upc | html %]&amp;oclc=[% biblio.normalized_oclc | html %]"
182
                                alt=""
171
                                alt=""
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-2 / +1 lines)
Lines 22-30 Link Here
22
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
22
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
23
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
23
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
24
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
24
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
25
[% SET BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %]
26
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
25
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
27
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || BakerTaylorEnabled || OPACCoce || OPACCustomCoverImages ) %]
26
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || OPACCoce || OPACCustomCoverImages ) %]
28
    [% SET CoverImages = 1 %]
27
    [% SET CoverImages = 1 %]
29
    [% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %]
28
    [% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %]
30
    [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
29
    [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-2 / +1 lines)
Lines 23-31 Link Here
23
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
23
[% SET SyndeticsCoverImages = ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %]
24
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
24
[% SET GoogleJackets = Koha.Preference('GoogleJackets') %]
25
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
25
[% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %]
26
[% SET BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %]
27
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
26
[% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %]
28
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || BakerTaylorEnabled || OPACCoce || OPACCustomCoverImages ) %]
27
[% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || OPACCoce || OPACCustomCoverImages ) %]
29
    [% SET CoverImages = 1 %]
28
    [% SET CoverImages = 1 %]
30
    [% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %]
29
    [% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %]
31
    [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
30
    [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt (-3 lines)
Lines 27-35 Link Here
27
                        />
27
                        />
28
                    [% END %][% END %][% END %]
28
                    [% END %][% END %][% END %]
29
29
30
                    [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
31
                    [% IF ( BakerTaylorEnabled && bt_id ) %]<a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>[% END %]
32
33
                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
30
                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
34
                        [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
31
                        [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
35
                        [% IF custom_cover_image_url %]
32
                        [% IF custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt (-8 lines)
Lines 139-152 Link Here
139
                                            [% END %]
139
                                            [% END %]
140
                                        [% END %]
140
                                        [% END %]
141
                                    </a>
141
                                    </a>
142
                                    [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %]
143
                                    [% IF ( BakerTaylorEnabled ) %]
144
                                        [% IF ( bt_id ) %]
145
                                            <a href="https://[% review.BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% review.BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
146
                                        [% ELSE %]
147
                                            <span class="no-image">No cover image available</span>
148
                                        [% END %]
149
                                    [% END %]
150
142
151
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
143
                                    [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
152
                                        [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
144
                                        [% SET custom_cover_image_url = review.biblio_object.custom_cover_image_url %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-20 lines)
Lines 359-374 Link Here
359
                                                                    [% END %]
359
                                                                    [% END %]
360
                                                                [% END %]
360
                                                                [% END %]
361
361
362
                                                                [% IF ( BakerTaylorEnabled ) %]
363
                                                                    [% bt_id = ( ISSUE.normalized_upc || ISSUE.normalized_isbn ) %]
364
                                                                    [% IF ( bt_id ) %]
365
                                                                        <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
366
                                                                    [% ELSE %]
367
                                                                        <span class="no-image">No cover image available</span
368
                                                                        ><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
369
                                                                    [% END %]
370
                                                                [% END %]
371
372
                                                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
362
                                                                [% IF Koha.Preference('OPACCustomCoverImages') AND Koha.Preference('CustomCoverImagesURL') %]
373
                                                                    [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
363
                                                                    [% SET custom_cover_image_url = ISSUE.biblio_object.custom_cover_image_url %]
374
                                                                    [% IF custom_cover_image_url %]
364
                                                                    [% IF custom_cover_image_url %]
Lines 730-745 Link Here
730
                                                                [% END %]
720
                                                                [% END %]
731
                                                            [% END %]
721
                                                            [% END %]
732
722
733
                                                            [% IF ( BakerTaylorEnabled ) %]
734
                                                                [% bt_id = ( OVERDUE.normalized_upc || OVERDUE.normalized_isbn ) %]
735
                                                                [% IF ( bt_id ) %]
736
                                                                    <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
737
                                                                [% ELSE %]
738
                                                                    <span class="no-image">No cover image available</span
739
                                                                    ><!-- BakerTaylor needs normalized_upc or normalized_isbn! -->
740
                                                                [% END %]
741
                                                            [% END %]
742
743
                                                            [% IF ( SyndeticsCoverImages ) %]
723
                                                            [% IF ( SyndeticsCoverImages ) %]
744
                                                                <img
724
                                                                <img
745
                                                                    src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&amp;client=[% SyndeticsClientCode | html %]&amp;upc=[% OVERDUE.normalized_upc | html %]&amp;oclc=[% OVERDUE.normalized_oclc | html %]&amp;type=xw10"
725
                                                                    src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn | html %]/[% SyndeticsCoverImageSize | uri %].GIF&amp;client=[% SyndeticsClientCode | html %]&amp;upc=[% OVERDUE.normalized_upc | html %]&amp;oclc=[% OVERDUE.normalized_oclc | html %]&amp;type=xw10"
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/cover_images.js (-4 lines)
Lines 73-82 function verify_cover_images() { Link Here
73
                        }
73
                        }
74
                        div.find(".hint").html(coce_description);
74
                        div.find(".hint").html(coce_description);
75
                        lightbox_descriptions.push(coce_description);
75
                        lightbox_descriptions.push(coce_description);
76
                    } else if (div.hasClass("bakertaylor-coverimg")) {
77
                        lightbox_descriptions.push(
78
                            __("Image from Baker &amp; Taylor")
79
                        );
80
                    } else if (div.hasClass("cover-image local-coverimg")) {
76
                    } else if (div.hasClass("cover-image local-coverimg")) {
81
                        lightbox_descriptions.push(__("Local cover image"));
77
                        lightbox_descriptions.push(__("Local cover image"));
82
                    } else {
78
                    } else {
(-)a/opac/opac-detail.pl (-27 / +5 lines)
Lines 43-54 use C4::Biblio qw( Link Here
43
    GetMarcSubjects
43
    GetMarcSubjects
44
    GetMarcUrls
44
    GetMarcUrls
45
);
45
);
46
use C4::Record                qw( marc2cites );
46
use C4::Record              qw( marc2cites );
47
use C4::Tags                  qw( get_tags );
47
use C4::Tags                qw( get_tags );
48
use C4::XISBN                 qw( get_xisbns );
48
use C4::XISBN               qw( get_xisbns );
49
use C4::External::Amazon      qw( get_amazon_tld );
49
use C4::External::Amazon    qw( get_amazon_tld );
50
use C4::External::BakerTaylor qw( image_url link_url );
50
use C4::External::Syndetics qw(
51
use C4::External::Syndetics   qw(
52
    get_syndetics_anotes
51
    get_syndetics_anotes
53
    get_syndetics_excerpt
52
    get_syndetics_excerpt
54
    get_syndetics_index
53
    get_syndetics_index
Lines 1142-1168 if ( C4::Context->preference("OPACShelfBrowser") ) { Link Here
1142
1141
1143
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("OPACAmazonCoverImages") );
1142
$template->param( AmazonTld => get_amazon_tld() ) if ( C4::Context->preference("OPACAmazonCoverImages") );
1144
1143
1145
if ( C4::Context->preference("BakerTaylorEnabled") ) {
1146
    $template->param(
1147
        BakerTaylorEnabled      => 1,
1148
        BakerTaylorImageURL     => &image_url(),
1149
        BakerTaylorLinkURL      => &link_url(),
1150
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
1151
    );
1152
    my ( $bt_user, $bt_pass );
1153
    if (    $isbn
1154
        and $bt_user = C4::Context->preference('BakerTaylorUsername')
1155
        and $bt_pass = C4::Context->preference('BakerTaylorPassword') )
1156
    {
1157
        $template->param(
1158
            BakerTaylorContentURL => sprintf(
1159
                "https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
1160
                $bt_user, $bt_pass, $isbn
1161
            )
1162
        );
1163
    }
1164
}
1165
1166
my $tag_quantity;
1144
my $tag_quantity;
1167
if ( C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail') ) {
1145
if ( C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail') ) {
1168
    $template->param(
1146
    $template->param(
(-)a/opac/opac-readingrecord.pl (-9 lines)
Lines 21-27 use CGI qw ( -utf8 ); Link Here
21
21
22
use C4::Auth qw( get_template_and_user );
22
use C4::Auth qw( get_template_and_user );
23
use C4::Biblio;
23
use C4::Biblio;
24
use C4::External::BakerTaylor qw( image_url link_url );
25
use MARC::Record;
24
use MARC::Record;
26
25
27
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output qw( output_html_with_http_headers );
Lines 87-100 my $old_checkouts = [ Link Here
87
    )->as_list
86
    )->as_list
88
];
87
];
89
88
90
if ( C4::Context->preference('BakerTaylorEnabled') ) {
91
    $template->param(
92
        JacketImages        => 1,
93
        BakerTaylorImageURL => &image_url(),
94
        BakerTaylorLinkURL  => &link_url(),
95
    );
96
}
97
98
my $saving_display = C4::Context->preference('OPACShowSavings');
89
my $saving_display = C4::Context->preference('OPACShowSavings');
99
if ( $saving_display =~ /checkouthistory/ ) {
90
if ( $saving_display =~ /checkouthistory/ ) {
100
    $template->param( savings => $patron->get_savings );
91
    $template->param( savings => $patron->get_savings );
(-)a/opac/opac-search.pl (-10 lines)
Lines 54-60 use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorise Link Here
54
use C4::Tags   qw( get_tags );
54
use C4::Tags   qw( get_tags );
55
use C4::SocialData;
55
use C4::SocialData;
56
use C4::External::OverDrive;
56
use C4::External::OverDrive;
57
use C4::External::BakerTaylor qw( image_url link_url );
58
57
59
use Koha::CirculationRules;
58
use Koha::CirculationRules;
60
use Koha::Libraries;
59
use Koha::Libraries;
Lines 173-187 $template->param( 'OPACNoResultsFound' => C4::Context->preference('OPACNoResults Link Here
173
172
174
$template->param( OpacStarRatings => C4::Context->preference("OpacStarRatings") );
173
$template->param( OpacStarRatings => C4::Context->preference("OpacStarRatings") );
175
174
176
if ( C4::Context->preference('BakerTaylorEnabled') ) {
177
    $template->param(
178
        BakerTaylorEnabled      => 1,
179
        BakerTaylorImageURL     => &image_url(),
180
        BakerTaylorLinkURL      => &link_url(),
181
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
182
    );
183
}
184
185
## URI Re-Writing
175
## URI Re-Writing
186
# Deprecated, but preserved because it's interesting :-)
176
# Deprecated, but preserved because it's interesting :-)
187
# The same thing can be accomplished with mod_rewrite in
177
# The same thing can be accomplished with mod_rewrite in
(-)a/opac/opac-shelves.pl (-12 / +4 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI                       qw ( -utf8 );
22
use CGI        qw ( -utf8 );
23
use C4::Auth                  qw( get_template_and_user );
23
use C4::Auth   qw( get_template_and_user );
24
use C4::Biblio                qw( GetBiblioData GetFrameworkCode );
24
use C4::Biblio qw( GetBiblioData GetFrameworkCode );
25
use C4::External::BakerTaylor qw( image_url link_url );
25
use C4::Koha   qw(
26
use C4::Koha                  qw(
27
    GetNormalizedEAN
26
    GetNormalizedEAN
28
    GetNormalizedISBN
27
    GetNormalizedISBN
29
    GetNormalizedOCLCNumber
28
    GetNormalizedOCLCNumber
Lines 83-95 if ( $op eq 'view' || $op eq 'list' ) { Link Here
83
    );
82
    );
84
}
83
}
85
84
86
if ( C4::Context->preference("BakerTaylorEnabled") ) {
87
    $template->param(
88
        BakerTaylorImageURL => &image_url(),
89
        BakerTaylorLinkURL  => &link_url(),
90
    );
91
}
92
93
my $referer = $query->param('referer') || $op;
85
my $referer = $query->param('referer') || $op;
94
my $page    = int( $query->param('page') || 1 );
86
my $page    = int( $query->param('page') || 1 );
95
my $public  = 0;
87
my $public  = 0;
(-)a/opac/opac-user.pl (-15 / +3 lines)
Lines 28-36 use C4::Koha qw( Link Here
28
    GetNormalizedUPC
28
    GetNormalizedUPC
29
    GetNormalizedOCLCNumber
29
    GetNormalizedOCLCNumber
30
);
30
);
31
use C4::Circulation           qw( CanBookBeRenewed GetRenewCount GetIssuingCharges );
31
use C4::Circulation qw( CanBookBeRenewed GetRenewCount GetIssuingCharges );
32
use C4::External::BakerTaylor qw( image_url link_url );
32
use C4::Reserves    qw( GetReserveStatus );
33
use C4::Reserves              qw( GetReserveStatus );
34
use C4::Members;
33
use C4::Members;
35
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output qw( output_html_with_http_headers );
36
use Koha::Account::Lines;
35
use Koha::Account::Lines;
Lines 298-305 if ( $pending_checkouts->count ) { # Useless test Link Here
298
        my $isbn = GetNormalizedISBN( $issue->{'isbn'} );
297
        my $isbn = GetNormalizedISBN( $issue->{'isbn'} );
299
        $issue->{normalized_isbn} = $isbn;
298
        $issue->{normalized_isbn} = $isbn;
300
299
301
        if (   C4::Context->preference('BakerTaylorEnabled')
300
        if (   C4::Context->preference('SyndeticsEnabled')
302
            || C4::Context->preference('SyndeticsEnabled')
303
            || C4::Context->preference('SyndeticsCoverImages') )
301
            || C4::Context->preference('SyndeticsCoverImages') )
304
        {
302
        {
305
            my $marcrecord = $biblio_object->metadata_record(
303
            my $marcrecord = $biblio_object->metadata_record(
Lines 357-374 if ( C4::Context->preference('UseRecalls') ) { Link Here
357
    $template->param( RECALLS => $recalls );
355
    $template->param( RECALLS => $recalls );
358
}
356
}
359
357
360
if ( C4::Context->preference('BakerTaylorEnabled') ) {
361
    $template->param(
362
        BakerTaylorEnabled      => 1,
363
        BakerTaylorImageURL     => &image_url(),
364
        BakerTaylorLinkURL      => &link_url(),
365
        BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
366
    );
367
}
368
369
if (   C4::Context->preference("OPACAmazonCoverImages")
358
if (   C4::Context->preference("OPACAmazonCoverImages")
370
    or C4::Context->preference("GoogleJackets")
359
    or C4::Context->preference("GoogleJackets")
371
    or C4::Context->preference("BakerTaylorEnabled")
372
    or C4::Context->preference("SyndeticsCoverImages")
360
    or C4::Context->preference("SyndeticsCoverImages")
373
    or ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') ) )
361
    or ( C4::Context->preference('OPACCustomCoverImages') and C4::Context->preference('CustomCoverImagesURL') ) )
374
{
362
{
(-)a/t/External/BakerTaylor.t (-37 lines)
Lines 1-36 Link Here
1
#!/usr/bin/perl
2
3
# some simple tests of the elements of C4::External::BakerTaylor that do not require a valid username and password
4
5
use Modern::Perl;
6
7
use Test::NoWarnings;
8
use Test::More tests => 10;
9
use t::lib::Mocks;
10
11
BEGIN {
12
    use_ok( 'C4::External::BakerTaylor', qw( link_url image_url content_cafe_url http_jacket_link availability ) );
13
}
14
15
# test with mocked prefs
16
my $username = "testing_username";
17
my $password = "testing_password";
18
my $link_url = "http://wrongexample.com?ContentCafe.aspx?UserID=$username";
19
20
t::lib::Mocks::mock_preference( 'BakerTaylorUsername',     $username );
21
t::lib::Mocks::mock_preference( 'BakerTaylorPassword',     $password );
22
t::lib::Mocks::mock_preference( 'BakerTaylorBookstoreURL', $link_url );
23
24
my $image_url =
25
    "https://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$username&Password=$password&Options=Y&Return=T&Type=S&Value=";
26
my $content_cafe =
27
    "https://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$username&Password=$password&Options=Y&ItemKey=";
28
29
is( C4::External::BakerTaylor::image_url(),            $image_url,          "testing default image url" );
30
is( C4::External::BakerTaylor::image_url("aa"),        $image_url . "aa",   "testing image url construction" );
31
is( C4::External::BakerTaylor::link_url(),             $link_url,           "testing default link url" );
32
is( C4::External::BakerTaylor::link_url("bb"),         "${link_url}bb",     "testing link url construction" );
33
is( C4::External::BakerTaylor::content_cafe_url(""),   $content_cafe,       "testing default content cafe url" );
34
is( C4::External::BakerTaylor::content_cafe_url("cc"), "${content_cafe}cc", "testing content cafe url construction" );
35
is( C4::External::BakerTaylor::http_jacket_link(""),   undef,               "testing empty http jacket link" );
36
is( C4::External::BakerTaylor::availability(""),       undef,               "testing empty availability" );
37
- 

Return to bug 41479