[Koha-cvs] CVS: koha delbiblio.pl,1.2.2.5,1.2.2.6
Steve Tonnesen
tonnesen at users.sourceforge.net
Wed Jan 15 22:37:21 CET 2003
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv16125
Modified Files:
Tag: rel-1-2
delbiblio.pl
Log Message:
Fixes dangling biblioitems problem. Will no longer allow you to delete a
biblio without also removing the biblioitems.
Index: delbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/delbiblio.pl,v
retrieving revision 1.2.2.5
retrieving revision 1.2.2.6
diff -C2 -r1.2.2.5 -r1.2.2.6
*** delbiblio.pl 29 Oct 2002 16:48:51 -0000 1.2.2.5
--- delbiblio.pl 15 Jan 2003 21:37:19 -0000 1.2.2.6
***************
*** 43,46 ****
--- 43,48 ----
#check no items attached
my $count=C4::Acquisitions::itemcount($biblio);
+ #check no biblioitems attached
+ my $biblioitemcount=C4::Acquisitions::biblioitemcount($biblio);
***************
*** 51,55 ****
--- 53,84 ----
";
} else {
+ if ($biblioitemcount && !($input->param('confirmed'))) {
+ print $input->header(-cookie => $cookie);
+ print << "EOF";
+ <table border=1 cellpadding=10 width=40%>
+ <tr><td>
+ This biblio has $biblioitemcount group(s) attached to it but no actual items.
+ Would you like to delete the biblio and all of its subgroups?
+ <p>
+ <center>
+ <table border=0 cellpadding=10>
+ <tr><td>
+ <form method=get>
+ <input type=hidden name=biblio value=$biblio>
+ <input type=hidden name=confirmed value=1>
+ <input type=submit value="Yes">
+ </form>
+ </td><td>
+ <form action=detail.pl>
+ <input type=hidden name=bib value=$biblio>
+ <input type=submit value="No">
+ </form>
+ </td></tr>
+ </table>
+ </td></tr>
+ EOF
+ } else {
delbiblio($biblio);
print $input->redirect("/cgi-bin/koha/catalogue-home.pl");
+ }
}
More information about the Koha-cvs
mailing list