From da14df0aed29984cc56fc5b202aa2329c6a03c41 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 2 Dec 2004 16:37:33 +0000 Subject: [PATCH] when deleting an itemtype, don't check issuingrules, but delete them too --- admin/itemtypes.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 8564c9c068..64fe84aa64 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -130,7 +130,7 @@ if ($op eq 'add_form') { # Check both categoryitem and biblioitems, see Bug 199 my $total = 0; - for my $table ('issuingrules', 'biblioitems') { + for my $table ('biblioitems') { my $sth=$dbh->prepare("select count(*) as total from $table where itemtype=?"); $sth->execute($itemtype); $total += $sth->fetchrow_hashref->{total}; @@ -156,6 +156,8 @@ if ($op eq 'add_form') { my $itemtype=uc($input->param('itemtype')); my $sth=$dbh->prepare("delete from itemtypes where itemtype=?"); $sth->execute($itemtype); + $sth = $dbh->prepare("delete from issuingrules where itemtype=?"); + $sth->execute($itemtype); $sth->finish; print "Content-Type: text/html\n\n"; exit; -- 2.20.1