Bug 12768: DB changes
[koha.git] / svc / import_bib
index b02e5f2..c611224 100755 (executable)
@@ -44,7 +44,7 @@ if ($query->request_method eq "POST") {
     $xml = $query->param('xml');
 }
 if ($xml) {
-    my %params = map { $_ => $query->param($_) } $query->param;
+    my %params = map { $_ => scalar $query->param($_) } $query->param;
     my $result = import_bib($xml, \%params );
     print $query->header(-type => 'text/xml');
     print XMLout($result, NoAttr => 1, RootName => 'response', XMLDecl => 1);
@@ -98,7 +98,7 @@ sub import_bib {
     $sth = $dbh->prepare("SELECT overlay_status FROM import_records WHERE import_record_id =?");
     $sth->execute($import_record_id);
     my $match_status = $sth->fetchrow_arrayref->[0] || 'no_match';
-    my $url = 'http://'. C4::Context->preference('staffClientBaseURL') .'/cgi-bin/koha/catalogue/detail.pl?biblionumber='. $biblionumber;
+    my $url = C4::Context->preference('staffClientBaseURL') .'/cgi-bin/koha/catalogue/detail.pl?biblionumber='. $biblionumber;
 
     $result->{'status'} = "ok";
     $result->{'import_batch_id'} = $batch_id;