Bugzilla – Attachment 100158 Details for
Bug 22969
fix biblionumber on 001 in UNIMARC XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22969: fix biblionumber on 001 in UNIMARC XSLT
Bug-22969-fix-biblionumber-on-001-in-UNIMARC-XSLT.patch (text/plain), 4.46 KB, created by
Bernardo Gonzalez Kriegel
on 2020-03-05 00:37:54 UTC
(
hide
)
Description:
Bug 22969: fix biblionumber on 001 in UNIMARC XSLT
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2020-03-05 00:37:54 UTC
Size:
4.46 KB
patch
obsolete
>From 00ac810de4e06b43aa19f6b850041b82ee2144f0 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Thu, 23 May 2019 07:55:15 +0200 >Subject: [PATCH] Bug 22969: fix biblionumber on 001 in UNIMARC XSLT > >In UNIMARC default configuration the 001 is linked to biblio.biblionumber. >In some XSLT files, 090$a is used. >This is by default biblioitems.biblionumber so it usually works but it may not be the same and var biblionumber is used to create hyperlinks to record detail page. > >Test plan : >1) Use UNIMARC database >2) Set default in all XSLT system preferences >3) At OPAC, perform a search and click on a result >4) Check displayed page shows the correct biblio record >5) Same at intranet > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Tested on clean UNIMARC install. >Before insert new records: "alter table biblioitems AUTO_INCREMENT = 5" >Added two records, with result: >+--------------+------------------+ >| biblionumber | biblioitemnumber | >+--------------+------------------+ >| 1 | 5 | >| 2 | 6 | >+--------------+------------------+ >Without patch, OPAC results shows for first record > http://opac/cgi-bin/koha/opac-detail.pl?biblionumber=5, Wrong! >with patch result is correct > >Works, no errors >--- > .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 2 +- > .../opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl | 2 +- > .../opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 6 ++---- > 3 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >index 361b88c10c..5f6e2b1782 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl >@@ -19,7 +19,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >- <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/> >+ <xsl:variable name="biblionumber" select="marc:controlfield[@tag=001]"/> > > > <xsl:if test="marc:datafield[@tag=200]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >index 55fd2293ad..e5afad7c67 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACDetail.xsl >@@ -18,7 +18,7 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >- <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/> >+ <xsl:variable name="biblionumber" select="marc:controlfield[@tag=001]"/> > <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/> > <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/> > <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >index 2174d5d935..3279def752 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >@@ -23,10 +23,8 @@ > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >- <xsl:variable name="biblionumber" >- select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/> >- <xsl:variable name="isbn" >- select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/> >+ <xsl:variable name="biblionumber" select="marc:controlfield[@tag=001]"/> >+ <xsl:variable name="isbn" select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/> > <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/> > <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/> > <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> >-- >2.17.1
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 22969
:
89994
|
100158
|
100213