Bug 5510: prepend output with system name
[koha.git] / serials / serials-edit.pl
index 6357fc7..90f3281 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
 # Copyright 2000-2002 Katipo Communications
+# Parts Copyright 2010 Biblibre
 #
 # This file is part of Koha.
 #
@@ -71,6 +72,7 @@ use C4::Koha;
 use C4::Output;
 use C4::Context;
 use C4::Serials;
+use List::MoreUtils qw/uniq/;
 
 my $query           = CGI->new();
 my $dbh             = C4::Context->dbh;
@@ -102,8 +104,7 @@ unless (@serialids) {
 }
 
 unless ( scalar(@serialids) ) {
-    my $string =
-      "serials-collection.pl?subscriptionid=" . join( ",", @subscriptionids );
+    my $string = "serials-collection.pl?subscriptionid=" . join( ",", uniq @subscriptionids );
     $string =~ s/,$//;
 
     print $query->redirect($string);
@@ -369,14 +370,21 @@ if ( $op and $op eq 'serialchangestatus' ) {
         print $query->redirect($redirect);
     }
 }
+my $location = GetAuthorisedValues('LOC', $serialdatalist[0]->{'location'});
+my $locationlib;
+foreach (@$location) {
+    $locationlib = $_->{'lib'} if $_->{'selected'};
+}
 my $default_bib_view = get_default_view();
 
 $template->param(
     serialsadditems => $serialdatalist[0]->{'serialsadditems'},
+    callnumber      => $serialdatalist[0]->{'callnumber'},
     bibliotitle     => $bibdata->{'title'},
     biblionumber    => $serialdatalist[0]->{'biblionumber'},
     serialslist     => \@serialdatalist,
     default_bib_view => $default_bib_view,
+    location         => $locationlib,
 );
 output_html_with_http_headers $query, $cookie, $template->output;