Quick fix to stop ppl from being able to delete biblios that have items attached
authorrangi <rangi>
Tue, 27 Feb 2001 22:08:57 +0000 (22:08 +0000)
committerrangi <rangi>
Tue, 27 Feb 2001 22:08:57 +0000 (22:08 +0000)
delbiblio.pl

index 2c84eb0..2724e74 100755 (executable)
@@ -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<p>
+  ";
+} else {
+#delbiblio($biblio);
 print $input->redirect("/catalogue/");
+}