From 81464b928cb94156234c0316c4d5337ee672bd83 Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Tue, 11 Oct 2016 12:59:36 +0000 Subject: [PATCH] Bug 17047 - Use Koha::Libraries instead of GetBranches --- serials/serials-search.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/serials/serials-search.pl b/serials/serials-search.pl index bd52cd7..70486b2 100755 --- a/serials/serials-search.pl +++ b/serials/serials-search.pl @@ -165,14 +165,14 @@ else } } - my $branches = GetBranches(); + my @branches = Koha::Libraries->search( {}, { order_by => ['branchcode'] } ); my @branches_loop; - foreach (sort keys %$branches){ + foreach my $b ( @branches ) { my $selected = 0; - $selected = 1 if( defined $branch and $branch eq $_ ); + $selected = 1 if( defined $branch and $branch eq $b->branchcode ); push @branches_loop, { - branchcode => $_, - branchname => $branches->{$_}->{'branchname'}, + branchcode => $b->branchcode, + branchname => $b->branchname, selected => $selected, }; } -- 2.7.4