From a2c7956faa54fb9c5ec23cb6fec04554d77e84d3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 15 Oct 2008 10:36:32 -0500 Subject: [PATCH] Fix for Bug 2682 ("Approving Multiple Tags - Doesn't Work"). Processing based on value of submit buttons didn't take into account capitalization. Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl | 4 ++-- tags/review.pl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl index 32bd03480a..a25aa21905 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tmpl @@ -232,11 +232,11 @@ Calendar.setup({ -
+
Approved Rejected Tested - Unkown Operation () on + Unknown Operation () on Term(s).
diff --git a/tags/review.pl b/tags/review.pl index 2c8c88d4b6..c687034065 100755 --- a/tags/review.pl +++ b/tags/review.pl @@ -93,15 +93,15 @@ $op = $input->param('op') || 'none'; @tags = $input->param('tags'); $borrowernumber == 0 and push @errors, {op_zero=>1}; - if ($op eq 'approve') { + if (lc($op) eq 'approve') { foreach (@tags) { whitelist($borrowernumber,$_) or push @errors, {failed_ok=>$_}; } -} elsif ($op eq 'reject' ) { +} elsif (lc($op) eq 'reject' ) { foreach (@tags) { blacklist($borrowernumber,$_) or push @errors, {failed_rej=>$_}; } -} elsif ($op eq 'test' ) { +} elsif (lc($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 => $op, + op => lc($op), op_count => scalar(@tags), script_name => $script_name, approved => 0, # dummy value (also EXPR) -- 2.39.5