[Koha-patches] [PATCH] [bug #2766] Just add the record in the new shelf
Galen Charlton
galen.charlton at liblime.com
Fri Nov 7 15:13:19 CET 2008
Bug 2766 is a duplicate of 2709, for which a fix has already been
applied to HEAD. That can then be cherry-picked for 3.1.
Regards,
Galen
On Fri, Nov 7, 2008 at 3:33 AM, Nahuel Angelinetti
<nahuel.angelinetti at biblibre.com> wrote:
> At the moment, the script doesn't add the biblio record in the just created shelf, but it should.
> This patch fix this, and add the record in the shelf.
> ---
> opac/opac-addbybiblionumber.pl | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl
> index 9fe02ee..148441f 100755
> --- a/opac/opac-addbybiblionumber.pl
> +++ b/opac/opac-addbybiblionumber.pl
> @@ -50,6 +50,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
>
> if ($newvirtualshelf) {
> $shelfnumber = AddShelf( $newvirtualshelf, $loggedinuser, $category );
> + if(@biblionumber){
> + AddToShelfFromBiblio(@biblionumber,$shelfnumber);
> + }
> RefreshShelvesSummary($query->cookie("CGISESSID"),$loggedinuser,($loggedinuser == -1 ? 20 : 10));
> print $query->header;
> print "<html><body onload=\"window.opener.location.reload(true);self.close();\"></body></html>";
> @@ -95,13 +98,13 @@ else {
> my ($shelflist) = GetRecentShelves(1, $limit, $loggedinuser);
> my @shelvesloop;
> my %shelvesloop;
> - for my $shelf ( @{${@$shelflist}[0]} ) {
> + for my $shelf ( @{ $shelflist->[0] } ) {
> push( @shelvesloop, $shelf->{shelfnumber} );
> $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname};
> }
> # then open shelves...
> my ($shelflist) = GetRecentShelves(3, $limit, undef);
> - for my $shelf ( @{${@$shelflist}[0]} ) {
> + for my $shelf ( @{ $shelflist->[0] } ) {
> push( @shelvesloop, $shelf->{shelfnumber} );
> $shelvesloop{$shelf->{shelfnumber}} = $shelf->{shelfname};
> }
> --
> 1.5.6.3
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches
>
--
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