--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
@@ -76,7 +76,7 @@
[% resultsloo.title | html %]
- [% FOREACH subtitl IN resultsloo.subtitle %][% subtitl.subfield | html %][% END %]
+ [% FOREACH subtitl IN resultsloo.subtitle %][% subtitl | html %][% END %]
[% IF ( resultsloo.summary ) %]
[% resultsloo.summary | html %]
[% ELSE %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt
@@ -101,7 +101,7 @@ div#result { margin-top: 1em; }
[% record.data.title | html %]
[% FOREACH subtitle IN record.subtitles %]
- [% subtitle.subfield | html %]
+ [% subtitle | html %]
[% END %]
([% record.biblionumber | uri %]) View MARC
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt
@@ -117,7 +117,7 @@
[% END %]
[% checkout_info.barcode | html %]
- [% checkout_info.biblio.title | html %][% FOREACH subtitle IN checkout_info.biblio.subtitles %] [% subtitle.subfield | html %][% END %] [% IF checkout_info.biblio.author %], by [% checkout_info.biblio.author | html %][% END %][% IF ( checkout_info.item.itemnotes ) %]- [% checkout_info.item.itemnotes | html %] [% END %] [% checkout_info.item.barcode | html %]
+ [% checkout_info.biblio.title | html %][% FOREACH subtitle IN checkout_info.biblio.subtitles %] [% subtitle | html %][% END %] [% IF checkout_info.biblio.author %], by [% checkout_info.biblio.author | html %][% END %][% IF ( checkout_info.item.itemnotes ) %]- [% checkout_info.item.itemnotes | html %] [% END %] [% checkout_info.item.barcode | html %]
[% IF checkout_info.NEEDSCONFIRMATION %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
@@ -57,7 +57,7 @@
[% reserveloo.reservecount | html %]
[% reserveloo.itemcount | html %]
[% reserveloo.thisratio | html %]
-
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title | html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield | html %][% END %][% END %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
+ [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title | html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl | html %][% END %][% END %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
@@ -52,7 +52,7 @@
[% END %]
[% reser.datetransfer | $KohaDates %]
[% IF ( reser.messcompa ) %]Transfer is [% reser.diff | html %] days late [% END %]
- [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title | html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield | html %][% END %][% END %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %]
+ [% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title | html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl | html %][% END %][% END %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %]
[% IF ( reser.itemtype ) %] ([% reser.itemtype | html %] )[% END %]
Barcode: [% reser.barcode | html %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -54,7 +54,7 @@
[% END %]
[% UNLESS ( multi_hold ) %]
- Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title | html %]
+ Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title | html %] [% subtitle | html %] [% part_number | html %] [% part_name | html %]
[% ELSE %]
Confirm holds
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
@@ -30,7 +30,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
[% FOREACH title IN titles %]
- [% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title | html %][% FOREACH subtitl IN title.subtitle %] [% subtitl.subfield | html %][% END %]
+ [% INCLUDE 'biblio-default-view.inc' biblionumber = title.biblionumber %][% title.title | html %][% FOREACH subtitl IN title.subtitle %] [% subtitl | html %][% END %]
[% title.author | html %]
[% IF ( title.publishercode ) %]- [% title.publishercode | html %]
[% IF ( title.place ) %] [% title.place | html %][% END %][% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt
@@ -152,7 +152,7 @@
[% biblio.biblionumber | html %]
- [% INCLUDE 'biblio-default-view.inc' biblionumber=biblio.biblionumber %][% biblio.title | html %][% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle %] [% subtitle.subfield | html %][% END %][% END %]
+ [% INCLUDE 'biblio-default-view.inc' biblionumber=biblio.biblionumber %][% biblio.title | html %][% IF ( biblio.subtitle ) %][% FOREACH subtitle IN biblio.subtitle %] [% subtitle | html %][% END %][% END %]
[% biblio.itemnumbers.size | html %]
[% biblio.holds_count | html %]
[% biblio.issues_count | html %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt
@@ -33,7 +33,7 @@ Your list: [% shelfname | $raw %]
[% BIBLIO_RESULT.title | $raw %]
[% IF ( BIBLIO_RESULT.subtitle.size ) %]
[% FOREACH subtitle IN BIBLIO_RESULT.subtitle %]
- [% subtitle.subfield | $raw %]
+ [% subtitle | $raw %]
[% END %]
[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
@@ -212,7 +212,7 @@
[% itemsloo.XSLTBloc | $raw %]
[% ELSE %]
[% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %]
- [% itemsloo.title | html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl.subfield | html %][% END %]
+ [% itemsloo.title | html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl | html %][% END %]
[% END %]
[% IF ( itemsloo.notforloan ) %]
--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
@@ -240,9 +240,11 @@ $(document).ready(function() {
+ oObj.title.escapeHtml();
$.each(oObj.subtitle, function( index, value ) {
- title += " " + value.subfield.escapeHtml();
+ title += " " + value.escapeHtml();
});
+ title += " " + oObj.part_number + " " + oObj.part_name;
+
if ( oObj.enumchron ) {
title += " (" + oObj.enumchron.escapeHtml() + ")";
}
@@ -595,9 +597,11 @@ $(document).ready(function() {
+ oObj.title.escapeHtml();
$.each(oObj.subtitle, function( index, value ) {
- title += " " + value.subfield.escapeHtml();
+ title += " " + value.escapeHtml();
});
+ title += " " + oObj.part_number + " " + oObj.part_name;
+
if ( oObj.enumchron ) {
title += " (" + oObj.enumchron.escapeHtml() + ")";
}
--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/holds.js
@@ -25,9 +25,11 @@ $(document).ready(function() {
+ oObj.title.escapeHtml();
$.each(oObj.subtitle, function( index, value ) {
- title += " " + value.subfield.escapeHtml();
+ title += " " + value.escapeHtml();
});
+ title += " " + oObj.part_number + " " + oObj.part_name;
+
title += "";
if ( oObj.author ) {
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc
@@ -81,7 +81,7 @@
[% item.title | html %]
[% FOREACH subtitl IN item.subtitle %]
[% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %]
- [% subtitl.subfield | html %]
+ [% subtitl | html %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
@@ -68,7 +68,7 @@
[% BIBLIO_RESULT.title | html %]
- [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %] [% END %][% END %]
+ [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl | html %] [% END %][% END %]
[% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]
@@ -256,7 +256,7 @@
- [% BIBLIO_RESULT.title | html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield | html %][% END %][% END %]
+ [% BIBLIO_RESULT.title | html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl | html %][% END %][% END %]
[% IF ( TagsInputEnabled && loggedinusername ) %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -30,7 +30,7 @@
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
-[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Details for: [% title | html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield | html %][% END %]
+[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Details for: [% title | html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl | html %][% END %]
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("lib/emoji-picker/css/emoji.css") | $raw %]
@@ -41,7 +41,7 @@
@@ -112,7 +112,7 @@
[% IF ( OPACXSLTDetailsDisplay ) %]
[% XSLTBloc | $raw %]
[% ELSE %]
-
[% title | html %][% IF ( subtitle ) %] [% FOREACH subtitl IN subtitle %][% subtitl.subfield | html %] [% END %] [% END %]
+
[% title | html %][% IF ( subtitle ) %] [% FOREACH subtitl IN subtitle %][% subtitl | html %] [% END %] [% END %]
[% IF ( author ) %]
[% END %]
[% UNLESS ( item_level_itypes ) %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
@@ -37,7 +37,7 @@
-
-
[% SEARCH_RESULT.title | html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %]
+ [% SEARCH_RESULT.title | html %] [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl | html %][% END %]
ISBN [% SEARCH_RESULT.isbn | html %]
[% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL | html %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% ELSE %][% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %][% END %][% END %]
[% IF issue.BiblioDefaultViewmarc %]
- [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]
+ [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl | html %][% END %][% END %]
[% ELSIF issue.BiblioDefaultViewisbd %]
- [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]
+ [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl | html %][% END %][% END %]
[% ELSE %]
- [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]
+ [% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl | html %][% END %][% END %]
[% END %]
[% issue.author | html %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -172,7 +172,7 @@
[% bibitemloo.title | html %]
[% IF ( bibitemloo.subtitle ) %]
[% FOREACH subtitl IN bibitemloo.subtitle %]
- [% subtitl.subfield | html %]
+ [% subtitl | html %]
[% END %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
@@ -111,7 +111,7 @@
[% FOREACH subtitl IN SEARCH_RESULT.subtitle %]
- [% subtitl.subfield | html %]
+ [% subtitl | html %]
[% END %]
@@ -185,7 +185,7 @@
[% GROUP_RESULT.title | html %]
[% END %]
[% FOREACH subtitl IN GROUP_RESULT.subtitle %]
- [% subtitl.subfield | html %]
+ [% subtitl | html %]
[% END %]
[% END # / IF GROUP_RESULT.BiblioDefaultViewmarc %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
@@ -346,7 +346,7 @@
[% END %]
[% FOREACH subtitl IN SEARCH_RESULT.subtitle %]
- , [% subtitl.subfield | html %]
+ , [% subtitl | html %]
[% END %]
[% IF ( SEARCH_RESULT.author ) %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt
@@ -34,7 +34,7 @@ Your list : [% shelfname | $raw %]
[% BIBLIO_RESULT.title | $raw %]
[% IF ( BIBLIO_RESULT.subtitle.size ) %]
[% FOREACH subtitle IN BIBLIO_RESULT.subtitle %]
- [% subtitle.subfield | $raw %]
+ [% subtitle | $raw %]
[% END %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
@@ -380,7 +380,7 @@
[% END %]
[% FOREACH subtitl IN itemsloo.subtitle %]
- [% subtitl.subfield | html %]
+ [% subtitl | html %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt
@@ -10,7 +10,7 @@
[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
[% FOREACH review IN reviews %]
-
-
New comment on [% review.title | html %] [% FOREACH subtitl IN review.subtitle %], [% subtitl.subfield | html %][% END %]
+ New comment on [% review.title | html %] [% FOREACH subtitl IN review.subtitle %], [% subtitl | html %][% END %]
[% OPACBaseURL | html %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber | html %]#comments
[% IF ( review.author ) %]
by [% review.author | html %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
@@ -152,7 +152,7 @@
[% MY_TAG.title | html %]
[% IF ( MY_TAG.subtitle ) %]
[% FOREACH subtitle IN MY_TAG.subtitle %]
- [% subtitle.subfield | html %]
+ [% subtitle | html %]
[% END %]
[% END %]
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
@@ -249,7 +249,7 @@
[% END # / IF JacketImages %]
- [% ISSUE.title | html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield | html %][% END %]
+ [% ISSUE.title | html %] [% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl | html %][% END %]
[% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %]
@@ -529,7 +529,7 @@
[% END # /IF jacketcell %]
- [% OVERDUE.title | html %] [% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield | html %][% END %]
+ [% OVERDUE.title | html %] [% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl | html %][% END %]
[% OVERDUE.author | html %]
--- a/opac/opac-reserve.pl
+++ a/opac/opac-reserve.pl
@@ -410,7 +410,7 @@ foreach my $biblioNum (@biblionumbers) {
my $frameworkcode = GetFrameworkCode( $biblioData->{biblionumber} );
$biblioLoopIter{biblionumber} = $biblioData->{biblionumber};
$biblioLoopIter{title} = $biblioData->{title};
- $biblioLoopIter{subtitle} = C4::Biblio::SplitSubtitle($biblioData->{'subtitle'});
+ $biblioLoopIter{subtitle} = C4::Biblio::SplitKohaField($biblioData->{'subtitle'});
$biblioLoopIter{medium} = $biblioData->{medium};
$biblioLoopIter{part_number} = $biblioData->{part_number};
$biblioLoopIter{part_name} = $biblioData->{part_name};
--- a/opac/opac-tags.pl
+++ a/opac/opac-tags.pl
@@ -257,7 +257,7 @@ if ($loggedinuser) {
}
next if ( $should_hide && scalar @all_items == scalar @hidden_itemnumbers );
$tag->{title} = $biblio->title;
- $tag->{subtitle} = C4::Biblio::SplitSubtitle($biblio->subtitle);
+ $tag->{subtitle} = C4::Biblio::SplitKohaField($biblio->subtitle);
$tag->{medium} = $biblio->medium;
$tag->{part_number} = $biblio->part_number;
$tag->{part_name} = $biblio->part_name;
--- a/opac/opac-user.pl
+++ a/opac/opac-user.pl
@@ -212,7 +212,7 @@ if ( $pending_checkouts->count ) { # Useless test
);
$issue->{rentalfines} = $rental_fines->total_outstanding;
- $issue->{'subtitle'} = C4::Biblio::SplitSubtitle($issue->{'subtitle'});
+ $issue->{'subtitle'} = C4::Biblio::SplitKohaField($issue->{'subtitle'});
# check if item is renewable
my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
--- a/reserve/request.pl
+++ a/reserve/request.pl
@@ -623,6 +623,9 @@ foreach my $biblionumber (@biblionumbers) {
biblionumber => $biblionumber,
findborrower => $findborrower,
title => $biblio->title,
+ subtitle => $biblio->subtitle,
+ part_number => $biblio->part_number,
+ part_name => $biblio->part_name,
author => $biblio->author,
holdsview => 1,
C4::Search::enabled_staff_search_views,
--- a/svc/checkouts
+++ a/svc/checkouts
@@ -23,7 +23,7 @@ use CGI;
use JSON qw(to_json);
use C4::Auth qw(check_cookie_auth haspermission get_session);
-use C4::Biblio qw(SplitSubtitle);
+use C4::Biblio qw(SplitKohaField);
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate);
use C4::Overdues qw(GetFine);
use C4::Context;
@@ -178,7 +178,7 @@ while ( my $c = $sth->fetchrow_hashref() ) {
my $checkout = {
DT_RowId => $c->{itemnumber} . '-' . $c->{borrowernumber},
title => $c->{title},
- subtitle => C4::Biblio::SplitSubtitle($c->{'subtitle'}),
+ subtitle => C4::Biblio::SplitKohaField($c->{'subtitle'}),
medium => $c->{medium} // '',
part_number => $c->{part_number} // '',
part_name => $c->{part_name} // '',
--- a/svc/holds
+++ a/svc/holds
@@ -23,7 +23,7 @@ use CGI;
use JSON qw(to_json);
use C4::Auth qw(check_cookie_auth);
-use C4::Biblio qw(SplitSubtitle);
+use C4::Biblio qw(SplitKohaField);
use C4::Charset;
use C4::Circulation qw(GetTransfers);
use C4::Context;
@@ -90,7 +90,7 @@ while ( my $h = $holds_rs->next() ) {
DT_RowId => $h->reserve_id(),
biblionumber => $biblionumber,
title => $biblio->title(),
- subtitle => C4::Biblio::SplitSubtitles($biblio->subtitle()),
+ subtitle => C4::Biblio::SplitKohaField($biblio->subtitle()),
medium => $biblio->medium(),
part_number => $biblio->part_number(),
part_name => $biblio->part_name(),
--- a/t/Biblio2.t
+++ a/t/Biblio2.t
@@ -52,20 +52,20 @@ sub _koha_marc_update_bib_ids_control {
is($r->field('004')->data(), 20, 'Biblioitemnumber to control field');
}
-subtest 'SplitSubtitle' => sub {
+subtest 'SplitKohaField' => sub {
plan tests => 4;
- my $res = C4::Biblio::SplitSubtitle(undef);
+ my $res = C4::Biblio::SplitKohaField(undef);
is_deeply($res, [], 'undef returned as an array');
- $res = C4::Biblio::SplitSubtitle('');
+ $res = C4::Biblio::SplitKohaField('');
is_deeply($res, [], 'Empty string returned as an array');
- $res = C4::Biblio::SplitSubtitle('Single');
- is_deeply($res, [{'subfield' => 'Single'}], 'Single subtitle returns an array');
+ $res = C4::Biblio::SplitKohaField('Single');
+ is_deeply($res, ['Single'], 'Single subtitle returned as an array');
- $res = C4::Biblio::SplitSubtitle('First | Second');
- is_deeply($res, [{'subfield' => 'First'}, {'subfield' => 'Second'}], 'Two subtitles returns an array');
+ $res = C4::Biblio::SplitKohaField('First | Second');
+ is_deeply($res, ['First', 'Second'], 'Two subtitles returned as an array');
};
done_testing();
--- a/tags/list.pl
+++ a/tags/list.pl
@@ -61,7 +61,7 @@ else {
my $taglist = get_tag_rows( { term => $tag } );
for ( @{$taglist} ) {
my $dat = &GetBiblioData( $_->{biblionumber} );
- $dat->{'subtitle'} = C4::Biblio::SplitSubtitles($dat->{'subtitle'}),
+ $dat->{'subtitle'} = C4::Biblio::SplitKohaFields($dat->{'subtitle'}),
my @items = GetItemsInfo( $_->{biblionumber} );
$dat->{biblionumber} = $_->{biblionumber};
$dat->{tag_id} = $_->{tag_id};
--- a/tools/batch_delete_records.pl
+++ a/tools/batch_delete_records.pl
@@ -94,7 +94,7 @@ if ( $op eq 'form' ) {
my $holds_count = $biblio->holds->count;
$biblio = $biblio->unblessed;
my $record = &GetMarcBiblio({ biblionumber => $record_id });
- $biblio->{subtitle} = C4::Biblio::SplitSubtitle( $biblio->{subtitle} );
+ $biblio->{subtitle} = C4::Biblio::SplitKohaField( $biblio->{subtitle} );
$biblio->{itemnumbers} = [Koha::Items->search({ biblionumber => $record_id })->get_column('itemnumber')];
$biblio->{holds_count} = $holds_count;
$biblio->{issues_count} = C4::Biblio::CountItemsIssued( $record_id );
--