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>
This commit is contained in:
Colin Campbell 2011-05-13 18:12:51 +02:00 committed by Chris Cormack
parent b5dcd096bf
commit 2ab00242d0
12 changed files with 15 additions and 20 deletions

View File

@ -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 = "

View File

@ -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) {

View File

@ -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) {

View File

@ -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);

View File

@ -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'};

View File

@ -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) {

View File

@ -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

View File

@ -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) {

View File

@ -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;

View File

@ -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' ) {

View File

@ -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);

View File

@ -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;