From 2122d767a4026b166ffa0c49a141ffd445bc7e6f Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 27 Feb 2001 22:08:57 +0000 Subject: [PATCH] Quick fix to stop ppl from being able to delete biblios that have items attached --- delbiblio.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/delbiblio.pl b/delbiblio.pl index 2c84eb0808..2724e746d1 100755 --- a/delbiblio.pl +++ b/delbiblio.pl @@ -16,6 +16,17 @@ my $input = new CGI; my $biblio=$input->param('biblio'); +#print $input->header; +#check no items attached +my $count=C4::Acquisitions::itemcount($biblio); + -delbiblio($biblio); +#print $count; +if ($count > 0){ + print $input->header; + print "This biblio has $count items attached, please delete them before deleting this biblio

+ "; +} else { +#delbiblio($biblio); print $input->redirect("/catalogue/"); +} -- 2.39.2