[Koha-cvs] CVS: koha/admin itemtypes.pl,1.15,1.16
Paul POULAIN
tipaul at users.sourceforge.net
Thu Dec 2 17:37:35 CET 2004
Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28937/admin
Modified Files:
itemtypes.pl
Log Message:
when deleting an itemtype, don't check issuingrules, but delete them too
Index: itemtypes.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/itemtypes.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** itemtypes.pl 13 Sep 2004 15:20:28 -0000 1.15
--- itemtypes.pl 2 Dec 2004 16:37:33 -0000 1.16
***************
*** 131,135 ****
# Check both categoryitem and biblioitems, see Bug 199
my $total = 0;
! for my $table ('issuingrules', 'biblioitems') {
my $sth=$dbh->prepare("select count(*) as total from $table where itemtype=?");
$sth->execute($itemtype);
--- 131,135 ----
# Check both categoryitem and biblioitems, see Bug 199
my $total = 0;
! for my $table ('biblioitems') {
my $sth=$dbh->prepare("select count(*) as total from $table where itemtype=?");
$sth->execute($itemtype);
***************
*** 157,160 ****
--- 157,162 ----
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<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=itemtypes.pl\"></html>";
More information about the Koha-cvs
mailing list