authorities/authorities.pl (the authority editor) has an op cud-delete. Hypothetically, it might have been run at some point before the template transition 13 years ago: somewhere between the initial commit of authorities support 20 years ago and then, the editor might have had a delete button that called it. Since then, it hasn't had one. You can see that it hasn't been run in the past 8 years by looking at the use block: before 8 years ago we had use C4::AuthoritiesMarc; but since then we've used specific exported things from it, never including DelAuthority. You might think it was used by deleting authorities in auth_finder.pl, a rather odd thing to have, but no: from the start, when it was auth_linker.pl, it has not had UI to delete. It did have the param nonav which it used to send people back to auth_linker after they created an authority, but since it was also passing myindex, the index of the bib field where auth_linker was supposed to put the results of its lookup, now the existence of that says it's an authority created from auth_finder and nonav is dead, too.
Created attachment 172940 [details] [review] 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
Created attachment 173171 [details] [review] 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 <yanjun.li@bywatersolutions.com>
Created attachment 173193 [details] [review] 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 <yanjun.li@bywatersolutions.com> Amended-by: Jonathan Druart tidy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.06
I prefer not backport to 23.11.x for stability
Removes code which has never done anything, nothing to document.