From 7bd778e41891c2d4904c9ee243566582fc9ed1a9 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 17 Oct 2024 20:16:14 -0700 Subject: [PATCH] Bug 38200: Remove dead code to delete authorities in authorities/authorities.pl It has probably never been used. There's no sign of any UI to delete from the authority editor or auth_finder in the last 13 years of templates, and it was unused when it landed; the patch that actually made the first patch work, a month later, put deleting authorities in authorities_home.pl, where it has been ever since. It certainly hasn't been used since bug 17600 landed in 2021, since it doesn't 'use C4::AuthoritiesMarc qw( DelAuthority );' and so if you try to use it you just get an error for your trouble. Sponsored-by: Chetco Community Public Library Signed-off-by: Yanjun Li --- authorities/authorities.pl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index 761c1f529d..56655bd307 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -540,7 +540,6 @@ my $error = $input->param('error'); my $authid = $input->param('authid') =~ s/\D//gr ; # if authid exists, it's a modif, not a new authority. We remove from authid all non-digit characters just in case the CGI parameter contains weird characters like spaces my $op = $input->param('op'); -my $nonav = $input->param('nonav'); my $myindex = $input->param('index'); my $linkid=$input->param('linkid'); my $authtypecode = $input->param('authtypecode'); @@ -570,7 +569,7 @@ my ($template, $loggedinuser, $cookie) type => "intranet", flagsrequired => {editauthorities => 1}, }); -$template->param(nonav => $nonav,index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid, count=>$count); +$template->param(index=>$myindex,authtypecode=>$authtypecode,breedingid=>$breedingid, count=>$count); $tagslib = GetTagsLabels(1,$authtypecode); $mandatory_z3950 = GetMandatoryFieldZ3950($authtypecode); @@ -631,16 +630,7 @@ if ($op eq "cud-add") { duplicateauthid => $duplicateauthid, duplicateauthvalue => $duplicateauthvalue->{'authorized'}->[0]->{'heading'}, ); - } -} elsif ($op eq "cud-delete") { -#------------------------------------------------------------------------------------------------------------------------------ - DelAuthority({ authid => $authid }); - if ($nonav){ - print $input->redirect("auth_finder.pl"); - }else{ - print $input->redirect("authorities-home.pl?authid=0"); - } - exit; + } } else { if ( $op eq "duplicate" ) { $authid = ""; -- 2.39.5