Koha/acqui.simple/savebiblio.pl
truth_nz 0b52637ff6 Fixed bug due to way hashes take values. Was stopping items being saved to
database. Added code to pick up branch list from database.
2002-05-06 02:47:49 +00:00

27 lines
908 B
Perl
Executable file

#!/usr/bin/perl
use CGI;
use strict;
use C4::Acquisitions;
my $input = new CGI;
my $biblio = {
title => $input->param('title'),
subtitle => $input->param('subtitle')?$input->param('subtitle'):"",
author => $input->param('author')?$input->param('author'):"",
seriestitle => $input->param('seriestitle')?$input->param('seriestitle'):"",
copyright => $input->param('copyrightdate')?$input->param('copyrightdate'):"",
abstract => $input->param('abstract')?$input->param('abstract'):"",
notes => $input->param('notes')?$input->param('notes'):""
}; # my $biblio
my $biblionumber;
if (! $biblio->{'title'}) {
print $input->redirect('addbiblio.pl?error=notitle');
} else {
$biblionumber = &newbiblio($biblio);
&newsubtitle($biblionumber, $biblio->{'subtitle'});
print $input->redirect("addbiblioitem.pl?biblionumber=$biblionumber");
} # else