bug 2585: fix search links for names (XSLT OPAC display)
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 5 Sep 2008 15:52:20 +0000 (10:52 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Tue, 9 Sep 2008 15:52:55 +0000 (10:52 -0500)
Fix malformed OPAC search syntax that caused this bug:

When using the default stylesheet for MARC21 XSLT OPAC details display, the
search links for name headings (from 100, 700, 710, 710, 111, and 711) that are
linked to authority records don't work.  When the user clicks on such a link,
they are directed to the advanced search form instead of the search results.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl

index 080be22..2e0ba36 100644 (file)
@@ -75,7 +75,7 @@
         <a>
         <xsl:choose>
             <xsl:when test="marc:subfield[@code=9]">
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
             <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
@@ -90,7 +90,7 @@
         <a>
         <xsl:choose>
             <xsl:when test="marc:subfield[@code=9]">
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
             <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>      
         <a>
         <xsl:choose>
             <xsl:when test="marc:subfield[@code=9]">
-                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+                <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
             <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>