[Koha-patches] [PATCH] Bug 2505 adding warnings to opac-authorities-home and fixing warnings generated
Chris Cormack
chrisc at catalyst.net.nz
Wed Apr 29 01:32:27 CEST 2009
---
opac/opac-authorities-home.pl | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/opac/opac-authorities-home.pl b/opac/opac-authorities-home.pl
index 764af2a..b1674f1 100755
--- a/opac/opac-authorities-home.pl
+++ b/opac/opac-authorities-home.pl
@@ -19,6 +19,7 @@
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
use CGI;
use C4::Auth;
@@ -30,8 +31,8 @@ use C4::AuthoritiesMarc;
use C4::Koha; # XXX subfield_is_koha_internal_p
my $query = new CGI;
-my $op = $query->param('op');
-my $authtypecode = $query->param('authtypecode');
+my $op = $query->param('op') || '';
+my $authtypecode = $query->param('authtypecode') || '';
my $dbh = C4::Context->dbh;
my $startfrom = $query->param('startfrom');
@@ -89,11 +90,11 @@ if ( $op eq "do_search" ) {
my @field_data = ();
foreach my $letter (qw/a b c/){
- push @field_data, { term => "marclist$letter" , val => $query->param("marclist$letter")};
- push @field_data, { term => "and_or$letter" , val => $query->param("and_or$letter")};
- push @field_data, { term => "excluding$letter" , val => $query->param("excluding$letter")};
- push @field_data, { term => "operator$letter" , val => $query->param("operator$letter")};
- push @field_data, { term => "value$letter" , val => $query->param("value$letter")};
+ push @field_data, { term => "marclist$letter" , val => $query->param("marclist$letter") || ''};
+ push @field_data, { term => "and_or$letter" , val => $query->param("and_or$letter") || ''};
+ push @field_data, { term => "excluding$letter" , val => $query->param("excluding$letter") || ''};
+ push @field_data, { term => "operator$letter" , val => $query->param("operator$letter") || ''};
+ push @field_data, { term => "value$letter" , val => $query->param("value$letter") || ''};
}
my @numbers = ();
--
1.5.6.5
More information about the Koha-patches
mailing list