diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 06bd3a347e..9488555c94 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -604,6 +604,26 @@ sub _shelf_count ($$) { return $total; } +sub _biblionumber_sth { + my ($shelf) = @_; + my $query = 'select biblionumber from virtualshelfcontents where shelfnumber = ?'; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare($query) + or die $dbh->errstr; + $sth->execute( $shelf ) + or die $sth->errstr; + $sth; +} + +sub each_biblionumbers (&$) { + my ($code,$shelf) = @_; + my $ref = _biblionumber_sth($shelf)->fetchall_arrayref; + map { + $_=$$_[0]; + $code->(); + } @$ref; +} + 1; __END__ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index 5c9687cf45..5d037a2812 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -121,7 +121,7 @@ function placeHold () {