[Koha-patches] [PATCH 1/1] Bug 9087: In Search.pl if there is parenthesis in itemcallnumber the link is broken

Christophe Croullebois christophe.croullebois at biblibre.com
Thu Nov 15 11:41:02 CET 2012


The search with parenthesis in 'q=xxxxx(x)xx' raises an error message:
"Can't call method "sort" on an undefined value at /home/koha/src/C4/Search.pm line 404."
The easier way to solve this problem is to put quotes for the query, q="xxxx(x)xx"
---
 .../prog/en/modules/catalogue/results.tt           |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
index 4d89a53..9e0ed9a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
@@ -556,7 +556,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
                                         [% END %]
                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname %][% END %]
                                         [% IF ( available_items_loo.location ) %][% available_items_loo.location %][% END %]
-                                        [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=[% available_items_loo.itemcallnumber |url %]">[% available_items_loo.itemcallnumber %]</a>][% END %]
+                                        [% IF ( available_items_loo.itemcallnumber ) %][<a href='/cgi-bin/koha/catalogue/search.pl?idx=callnum&q="[% available_items_loo.itemcallnumber |url %]"'>[% available_items_loo.itemcallnumber %]</a>][% END %]
                                         ([% available_items_loo.count %])
                                         [% IF item_level_itypes && available_items_loo.description %]
                                         <br/>[% available_items_loo.description %]
-- 
1.7.9.5



More information about the Koha-patches mailing list