Bugzilla – Attachment 151009 Details for
Bug 29185
Show MARC21 tag 765 - Original Language Entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29185: (QA follow-up) Quote title search in GetCnumSearchURL
Bug-29185-QA-follow-up-Quote-title-search-in-GetCn.patch (text/plain), 3.27 KB, created by
Marcel de Rooy
on 2023-05-10 14:04:39 UTC
(
hide
)
Description:
Bug 29185: (QA follow-up) Quote title search in GetCnumSearchURL
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-05-10 14:04:39 UTC
Size:
3.27 KB
patch
obsolete
>From 13eb0d3c3e05f1706cac78164c226c78dd04c544 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 10 May 2023 13:33:53 +0000 >Subject: [PATCH] Bug 29185: (QA follow-up) Quote title search in > GetCnumSearchURL >Content-Type: text/plain; charset=utf-8 > >Test plan: >Disable UseControlNumber >Change biblio title to something like: > Hamlet or CHINESE_CHARS >where you add some nice Chinese chars. >Create a 765 looking for that title in another biblio record. >Without this patch, the link at detail page finds both records, >since it looks for ti-phr:Hamlet OR the Chinese chars. >With this patch, the link at detail uses quotes and finds only >one, since the OR is now part of the ti-phr search. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 7 ++++++- > koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl | 7 ++++++- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 05668fa67e..3c3cecb6ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -765,7 +765,12 @@ > <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=Control-number:',$controlnumber),false())"/> > </xsl:when> > <xsl:otherwise> >- <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=ti,phr:',translate(marc:subfield[@code=$title_subfield], '()', '')),false())"/> >+ <xsl:variable name="quoted_title"> >+ <xsl:call-template name="quote_search_term"> >+ <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code=$title_subfield]"/></xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=ti,phr:',translate($quoted_title, '()', '')),false())"/> > </xsl:otherwise> > </xsl:choose> > </xsl:template> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index efc3e3677d..b0a8ad1b59 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -728,7 +728,12 @@ > <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=Control-number:',$controlnumber),false())"/> > </xsl:when> > <xsl:otherwise> >- <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=ti,phr:',translate(marc:subfield[@code=$title_subfield], '()', '')),false())"/> >+ <xsl:variable name="quoted_title"> >+ <xsl:call-template name="quote_search_term"> >+ <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code=$title_subfield]"/></xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:value-of select="str:encode-uri(concat($scriptname,'?q=ti,phr:',translate($quoted_title, '()', '')),false())"/> > </xsl:otherwise> > </xsl:choose> > </xsl:template> >-- >2.30.2
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 29185
:
149588
|
149589
|
149590
|
149906
|
149907
|
149908
|
150357
|
150358
|
150359
|
150365
| 151009