[Koha-patches] [PATCH] bug_11183: get rid of some warninngs
Srdjan
srdjan at catalyst.net.nz
Mon Nov 11 03:50:25 CET 2013
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..77de12f 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 defined($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
More information about the Koha-patches
mailing list