From 05dad853b7279b64c9a7e7bca80578a12fbf042c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 7 Feb 2024 15:54:28 +0100 Subject: [PATCH] Bug 36019: Remove dead code in tags/review Since bug 20489 it is no longer possible to login with the DB user. At the time, get_template_and_user returned borrowernumber=0 in this case. In tags/review.pl we have: $borrowernumber == 0 and push @errors, {op_zero=>1}; This condition is never met, and op_zero related code can be removed in the template. Test plan: Confirm the above Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt | 5 ----- tags/review.pl | 1 - 2 files changed, 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index db39e59957..fef5a7499c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -95,11 +95,6 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% ELSIF ( message_loo.failed_rej ) %]Error: Failed to reject term ([% message_loo.failed_rej | html %]). [% ELSIF ( message_loo.approver ) %]No match for user ([% message_loo.approver | html %]). FILTER REQUIRES BORROWERNUMBER (not name). [% ELSIF ( message_loo.approved_by ) %]Error: No match for borrowernumber ([% message_loo.approved_by | html %]). - [% ELSIF ( message_loo.op_zero ) %]Error: - The root koha user in your KOHA_CONF file - (default: kohaadmin) is not a valid tag moderator. These actions are logged - by borrowernumber, so the moderator must exist in your borrowers table. - Please log in as a different authorized staff user to moderate tags. [% ELSE %]Unrecognized error! [% END %]
diff --git a/tags/review.pl b/tags/review.pl index c2c97c8117..7cfbafe480 100755 --- a/tags/review.pl +++ b/tags/review.pl @@ -92,7 +92,6 @@ $op ||= 'none'; @tags = $input->multi_param('tags'); -$borrowernumber == 0 and push @errors, {op_zero=>1}; if ($op eq 'approve') { foreach (@tags) { whitelist($borrowernumber,$_) or push @errors, {failed_ok=>$_}; -- 2.39.5