Browse Source

Bug 6050 Make calls to GetItemsInfo consistent

Do not misleadingly document or pass an unused second parameter
makes all calls use the single parameter call as the C4
routines already did

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
3.6.x-rmaint/testing
Colin Campbell 11 years ago
committed by Chris Cormack
parent
commit
2ab00242d0
  1. 12
      C4/Items.pm
  2. 2
      basket/basket.pl
  3. 2
      basket/sendbasket.pl
  4. 3
      catalogue/detail.pl
  5. 2
      catalogue/detailprint.pl
  6. 2
      opac/opac-ISBDdetail.pl
  7. 2
      opac/opac-detail.pl
  8. 2
      opac/opac-sendbasket.pl
  9. 2
      opac/opac-sendshelf.pl
  10. 2
      reports/reservereport.pl
  11. 2
      serials/routing-preview.pl
  12. 2
      virtualshelves/sendshelf.pl

12
C4/Items.pm

@ -1112,16 +1112,12 @@ sub GetItemsByBiblioitemnumber {
=head2 GetItemsInfo
@results = GetItemsInfo($biblionumber, $type);
@results = GetItemsInfo($biblionumber);
Returns information about books with the given biblionumber.
C<$type> may be either C<intra> or anything else. If it is not set to
C<intra>, then the search will exclude lost, very overdue, and
withdrawn items.
Returns information about items with the given biblionumber.
C<GetItemsInfo> returns a list of references-to-hash. Each element
contains a number of keys. Most of them are table items from the
contains a number of keys. Most of them are attributes from the
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
Koha database. Other keys include:
@ -1157,7 +1153,7 @@ If this is set, it is set to C<One Order>.
=cut
sub GetItemsInfo {
my ( $biblionumber, $type ) = @_;
my ( $biblionumber ) = @_;
my $dbh = C4::Context->dbh;
# note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
my $query = "

2
basket/basket.pl

@ -66,7 +66,7 @@ foreach my $biblionumber ( @bibs ) {
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
my @items = &GetItemsInfo( $biblionumber, 'opac' );
my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {

2
basket/sendbasket.pl

@ -80,7 +80,7 @@ if ( $email_add ) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my @items = &GetItemsInfo( $biblionumber, 'opac' );
my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {

3
catalogue/detail.pl

@ -112,8 +112,7 @@ my $branches = GetBranches();
my $itemtypes = GetItemTypes();
my $dbh = C4::Context->dbh;
# 'intra' param included, even though it's not respected in GetItemsInfo currently
my @all_items= GetItemsInfo($biblionumber, 'intra');
my @all_items = GetItemsInfo( $biblionumber );
my @items;
for my $itm (@all_items) {
push @items, $itm unless ( $itm->{itemlost} && GetHideLostItemsPreference($borrowernumber) && !$showallitems);

2
catalogue/detailprint.pl

@ -35,7 +35,7 @@ my $type = $query->param('type');
my $biblionumber = $query->param('biblionumber');
# change back when ive fixed request.pl
my @items = GetItemsInfo( $biblionumber, $type );
my @items = GetItemsInfo( $biblionumber );
my $norequests = 1;
foreach my $itm (@items) {
$norequests = 0 unless $itm->{'notforloan'};

2
opac/opac-ISBDdetail.pl

@ -124,7 +124,7 @@ $template->param(
my $norequests = 1;
my $res = GetISBDView($biblionumber, "opac");
my @items = &GetItemsInfo($biblionumber, 'opac');
my @items = GetItemsInfo( $biblionumber );
my $itemtypes = GetItemTypes();
for my $itm (@items) {

2
opac/opac-detail.pl

@ -85,7 +85,7 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") );
# change back when ive fixed request.pl
my @all_items = &GetItemsInfo( $biblionumber, 'opac' );
my @all_items = GetItemsInfo( $biblionumber );
my @items;
# Getting items to be hidden

2
opac/opac-sendbasket.pl

@ -81,7 +81,7 @@ if ( $email_add ) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my @items = &GetItemsInfo( $biblionumber, 'opac' );
my @items = GetItemsInfo( $biblionumber );
my $hasauthors = 0;
if($dat->{'author'} || @$marcauthorsarray) {

2
opac/opac-sendshelf.pl

@ -88,7 +88,7 @@ if ( $email ) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my @items = &GetItemsInfo( $biblionumber, 'opac' );
my @items = GetItemsInfo( $biblionumber );
$dat->{MARCNOTES} = $marcnotesarray;
$dat->{MARCSUBJCTS} = $marcsubjctsarray;

2
reports/reservereport.pl

@ -96,7 +96,7 @@ for ( my $i = 0 ; $i < $count ; $i++ ) {
# FIXME still need to shift the text to the template so its translateable
if ( $data->[$i]) {
# find if its on issue
my @items = GetItemsInfo($line{'biblionumber'}, 'intra' );
my @items = GetItemsInfo( $line{biblionumber} );
my $onissue = 0;
foreach my $item (@items) {
if ( $item->{'datedue'} eq 'Reserved' ) {

2
serials/routing-preview.pl

@ -65,7 +65,7 @@ if($ok){
# get biblio information....
my $biblio = $subs->{'biblionumber'};
my ($count2,@bibitems) = GetBiblioItemByBiblioNumber($biblio);
my @itemresults = GetItemsInfo($subs->{'biblionumber'}, 'intra');
my @itemresults = GetItemsInfo( $subs->{biblionumber} );
my $branch = $itemresults[0]->{'holdingbranch'};
my $branchname = GetBranchName($branch);

2
virtualshelves/sendshelf.pl

@ -85,7 +85,7 @@ if ( $email ) {
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );
my @items = &GetItemsInfo( $biblionumber, 'opac' );
my @items = GetItemsInfo( $biblionumber );
$dat->{MARCNOTES} = $marcnotesarray;
$dat->{MARCSUBJCTS} = $marcsubjctsarray;

Loading…
Cancel
Save