[Koha-patches] [PATCH] Making itemcallnumber display in OPAC search results a little prettier. Removing duplicates.
Michael Hafen
mdhafen at washk12.org
Tue May 27 20:15:29 CEST 2008
---
opac/opac-search.pl | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 6133d62..265261b 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -421,6 +421,11 @@ for (my $i=0;$i<=@servers;$i++) {
exit;
}
if ($hits) {
+ # clean up itemcallnumber: remove duplicates
+ foreach ( @newresults ) {
+ my %call_nums = map { $_ => 1 } split ' \| ', $_->{itemcallnumber};
+ $_->{itemcallnumber} = join ' | ', keys %call_nums;
+ }
$template->param(total => $hits);
my $limit_cgi_not_availablity = $limit_cgi;
$limit_cgi_not_availablity =~ s/&limit=available//g;
--
1.5.4.3
More information about the Koha-patches
mailing list