[Koha-patches] [PATCH] Fix for Bug 2682 ("Approving Multiple Tags - Doesn't Work"). Processing based on value of submit buttons didn't take into account capitalization.

Owen Leonard oleonard at myacpl.org
Wed Oct 15 17:36:32 CEST 2008


---
 .../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 32bd034..a25aa21 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({
   </h4>
 
   <!-- TMPL_IF NAME="op_count" -->
-  <div class="message" id="main_status">
+  <div class="dialog message" id="main_status">
   		<!-- TMPL_IF EXPR="op eq 'approve'" -->		Approved
   		<!-- TMPL_ELSIF EXPR="op eq 'reject'" -->	Rejected
   		<!-- TMPL_ELSIF EXPR="op eq 'test'" -->		Tested
-  		<!-- TMPL_ELSE -->							Unkown Operation (<!-- TMPL_VAR NAME="op" -->) on
+  		<!-- TMPL_ELSE -->Unknown Operation (<!-- TMPL_VAR NAME="op" -->) on
   		<!-- /TMPL_IF -->
 	<!-- TMPL_VAR NAME="op_count" --> Term(s).
   </div>
diff --git a/tags/review.pl b/tags/review.pl
index 2c8c88d..c687034 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)
-- 
1.5.5.GIT




More information about the Koha-patches mailing list