From bb52bdccbfa292ead5422860f3dffffba0a028af Mon Sep 17 00:00:00 2001 From: Srdjan Date: Fri, 1 Nov 2013 21:05:09 +1300 Subject: [PATCH] bug_11183: get rid of some warninngs To test in OPAC: * Set EnableOpacSearchHistory to yes (Keep). Do an advanced search with limits. Complete search with limits should show. * Have an item with Collection Code. Check that the Collection Code shows. --- opac/opac-detail.pl | 2 +- opac/opac-search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 41de4fd..045491e 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -573,7 +573,7 @@ for my $itm (@items) { # get collection code description, too my $ccode = $itm->{'ccode'}; - $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) ); + $itm->{'ccode'} = $collections->{$ccode} if $ccode && $collections && exists( $collections->{$ccode} ); my $copynumber = $itm->{'copynumber'}; $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); if ( defined $itm->{'location'} ) { diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 2854da6..8604d0f 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -623,7 +623,7 @@ for (my $i=0;$i<@servers;$i++) { my $query_cgi_history = $cgi->url(-query=>1); $query_cgi_history =~ s/^$path_info\?//; $query_cgi_history =~ s/;/&/g; - my $query_desc_history = "$query_desc, $limit_desc"; + my $query_desc_history = join ", ", grep { defined $_ } $query_desc, $limit_desc; if (!$borrowernumber || $borrowernumber eq '') { # To a cookie (the user is not logged in) -- 1.8.1.2