From 8de2b6588f84def555fc377f3fa6d5fa94c418c1 Mon Sep 17 00:00:00 2001 From: Oleg Vasylenko Date: Mon, 3 Apr 2017 14:16:51 +0300 Subject: [PATCH 2/2] Bug 18369 - Broken title link in UNIMARC catalog search results table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In staff client, «Search the catalog» returns a table, where biblio title has a broken link (biblionumber is absent), yet other links works good (Holds, Edit Record, Edit items, OPAC view) Steps to Reproduce: In staff client, search the catalog (Cataloging → «Search the catalog» (/cgi-bin/koha/catalogue/search.pl)) Actual Results: Title of the biblio has a link, that doesn't have biblionumber Expected Results: Title of the biblio should have a link with a proper biblionumber at the end Additional Information: Each biblio in the results table is shown by XSL transformation of MARC data. XSL (\intranet-tmpl\prog\en\xslt\UNIMARCslim2intranetResults.xsl) prepares a link, and adds a biblionumber, that it expects to get from controlfield 001. But since this field could be either empty or contain something different than biblionumber (see https://lists.katipo.co.nz/public/koha/2015-September/043652.html), it is better to pass the biblionumber to this script. This script is already receiving sysprefs (that is not according to marcxml standart), so I suggest to pass the biblionumber the same way. --- C4/XSLT.pm | 3 ++- koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index b757f8ff8b..83a525f9ee 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -192,6 +192,7 @@ sub XSLTParse4Display { $sysxml ||= C4::Context->preference($xslsyspref); $xslfilename ||= C4::Context->preference($xslsyspref); $lang ||= C4::Languages::getlanguage(); + my $kohavars = "\n$biblionumber\n\n"; if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) { my $htdocs; @@ -242,7 +243,7 @@ sub XSLTParse4Display { my $itemsxml = buildKohaItemsNamespace($biblionumber, $hidden_items); my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour')); - $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml\<\/record\>/; + $xmlrecord =~ s/\<\/record\>/$itemsxml$sysxml$kohavars\<\/record\>/; if ($fixamps) { # We need to correct the HTML entities that Zebra outputs $xmlrecord =~ s/\&amp;/\&/g; $xmlrecord =~ s/\&\;lt\;/\<\;/g; diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl index 3e30890cd5..8c6ba6eef2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetResults.xsl @@ -22,7 +22,7 @@ - + -- 2.11.0.windows.1