Bug 18181: Can't tell which subscriptions already have a routing list if seeing all...
[koha.git] / serials / serials-search.pl
index 3e73c56..30bf7db 100755 (executable)
@@ -31,7 +31,6 @@ this script is the search page for serials
 use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Auth;
-use C4::Branch;
 use C4::Context;
 use C4::Koha qw( GetAuthorisedValues );
 use C4::Output;
@@ -53,7 +52,7 @@ my $location      = $query->param('location_filter') || '';
 my $expiration_date = $query->param('expiration_date_filter') || '';
 my $routing       = $query->param('routing') || C4::Context->preference("RoutingSerials");
 my $searched      = $query->param('searched') || 0;
-my @subscriptionids = $query ->param('subscriptionid');
+my @subscriptionids = $query->multi_param('subscriptionid');
 my $op            = $query->param('op');
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -131,19 +130,6 @@ for my $sub ( @subscriptions ) {
     }
 }
 
-my $branches = GetBranches();
-my @branches_loop;
-foreach (sort keys %$branches){
-    my $selected = 0;
-    $selected = 1 if( defined $branch and $branch eq $_ );
-    push @branches_loop, {
-        branchcode  => $_,
-        branchname  => $branches->{$_}->{'branchname'},
-        selected    => $selected,
-    };
-}
-
-
 $template->param(
     openedsubscriptions => \@openedsubscriptions,
     closedsubscriptions => \@closedsubscriptions,
@@ -155,9 +141,8 @@ $template->param(
     publisher_filter => $publisher,
     bookseller_filter  => $bookseller,
     branch_filter => $branch,
-    locations     => C4::Koha::GetAuthorisedValues('LOC', $location),
+    location_filter => $location,
     expiration_date_filter => $expiration_date_dt,
-    branches_loop => \@branches_loop,
     done_searched => $searched,
     routing       => $routing,
     additional_field_filters => $additional_field_filters,