From 9c998bac03f44870545b2200fffe0c43b2f07740 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 23 Oct 2008 16:07:19 -0500 Subject: [PATCH] bug 2682: followup - only do lc() on $op once Per suggestion by Joe Atzberger. Signed-off-by: Galen Charlton --- tags/review.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tags/review.pl b/tags/review.pl index c687034065..8bdfaa9861 100755 --- a/tags/review.pl +++ b/tags/review.pl @@ -89,19 +89,19 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ }); my ($op, @errors, @tags); -$op = $input->param('op') || 'none'; +$op = lc($input->param('op')) || 'none'; @tags = $input->param('tags'); $borrowernumber == 0 and push @errors, {op_zero=>1}; - if (lc($op) eq 'approve') { + if ($op eq 'approve') { foreach (@tags) { whitelist($borrowernumber,$_) or push @errors, {failed_ok=>$_}; } -} elsif (lc($op) eq 'reject' ) { +} elsif ($op eq 'reject' ) { foreach (@tags) { blacklist($borrowernumber,$_) or push @errors, {failed_rej=>$_}; } -} elsif (lc($op) eq 'test' ) { +} elsif ($op eq 'test' ) { my $tag = $input->param('test'); push @tags, $tag; my $check = is_approved($tag); @@ -205,7 +205,7 @@ $debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\ $template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), offset => $offset, # req'd for EXPR - op => lc($op), + op => $op, op_count => scalar(@tags), script_name => $script_name, approved => 0, # dummy value (also EXPR) -- 2.39.5