Bug 17941 don't compute priority more than needed

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Francesco Rivetti 2017-02-14 11:16:01 +01:00 committed by Kyle M Hall
parent 35e3678f13
commit 08b1ebec75

View file

@ -512,6 +512,7 @@ foreach my $biblionumber (@biblionumbers) {
} @reserves
)
{
my $priority = $res->priority();
my %reserve;
my @optionloop;
for ( my $i = 1 ; $i <= $totalcount ; $i++ ) {
@ -519,7 +520,7 @@ foreach my $biblionumber (@biblionumbers) {
@optionloop,
{
num => $i,
selected => ( $i == $res->priority() ),
selected => ( $i == $priority ),
}
);
}