bug 2682: followup - only do lc() on $op once
authorGalen Charlton <galen.charlton@liblime.com>
Thu, 23 Oct 2008 21:07:19 +0000 (16:07 -0500)
committerChris Cormack <chris@bigballofwax.co.nz>
Fri, 4 Sep 2009 02:43:29 +0000 (14:43 +1200)
Per suggestion by Joe Atzberger.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
tags/review.pl

index e8deec7..8bdfaa9 100755 (executable)
@@ -93,15 +93,15 @@ $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)