[Koha-patches] [PATCH] Bug 3146: OPAC Holds broken in Single Branch Mode.

Galen Charlton galen.charlton at liblime.com
Thu Jun 4 16:42:02 CEST 2009


Hi,

On Sat, May 30, 2009 at 7:03 PM, Ryan Higgins <rch at liblime.com> wrote:
> +    my @selectedItems = split(/\//, $selectedItems, $MAX_SIMULTANEOUS_RESERVES);

Seems like $MAX_SIMULTANEOUS_RESERVES * 3 would be more accurate.

> -        my $branch    = shift(@selectedItems); # i.e., branch code, not name
> -
> -        my $singleBranchMode = $template->param('singleBranchMode');
> -        if ($singleBranchMode) {
> -            $branch = $borr->{'branchcode'};
> -        }
> +        my $branch    = ($singleBranchMode) ? $borr->{'branchcode'} : shift(@selectedItems);

This breaks parsing of the selected items parameter.  Prior to this
patch, three values ($biblionumber, $itemnumber, and $branch) always
got shifted off of the @selectedItems array during each loop
iteration, whereas now only two get snarfed if you're in single branch
mode.  However, the form doesn't know that, and still supplies a
triplet for each request.

Please fix and resubmit.

Regards,

Galen
-- 
Galen Charlton
VP, Research & Development, LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709
skype: gmcharlt



More information about the Koha-patches mailing list