Browse Source

bug 8215: (followup) rename GetItemReservesInfo

Renamed that routine to GetItemCourseReservesInfo in
order to avoid any potential confusion with reserves
qua hold requests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
new/bootstrap-opac
Galen Charlton 10 years ago
parent
commit
97addc2fb4
  1. 6
      C4/CourseReserves.pm
  2. 4
      catalogue/detail.pl
  3. 4
      opac/opac-detail.pl
  4. 2
      t/db_dependent/CourseReserves.t

6
C4/CourseReserves.pm

@ -46,7 +46,7 @@ BEGIN {
&SearchCourses
&GetItemReservesInfo
&GetItemCourseReservesInfo
);
%EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
@ -934,14 +934,14 @@ sub DelCourseReserve {
=head2 GetReservesInfo
my $arrayref = GetItemReservesInfo( itemnumber => $itemnumber );
my $arrayref = GetItemCourseReservesInfo( itemnumber => $itemnumber );
For a given item, returns an arrayref of reserves hashrefs,
with a course hashref under the key 'course'
=cut
sub GetItemReservesInfo {
sub GetItemCourseReservesInfo {
my (%params) = @_;
warn identify_myself(%params) if $DEBUG;

4
catalogue/detail.pl

@ -41,7 +41,7 @@ use C4::XSLT;
use C4::Images;
use Koha::DateUtils;
use C4::HTML5Media;
use C4::CourseReserves qw(GetItemReservesInfo);
use C4::CourseReserves qw(GetItemCourseReservesInfo);
# use Smart::Comments;
@ -271,7 +271,7 @@ foreach my $item (@items) {
}
if ( C4::Context->preference('UseCourseReserves') ) {
$item->{'course_reserves'} = GetItemReservesInfo( itemnumber => $item->{'itemnumber'} );
$item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} );
}
if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"

4
opac/opac-detail.pl

@ -50,7 +50,7 @@ use List::MoreUtils qw/any none/;
use C4::Images;
use Koha::DateUtils;
use C4::HTML5Media;
use C4::CourseReserves qw(GetItemReservesInfo);
use C4::CourseReserves qw(GetItemCourseReservesInfo);
BEGIN {
if (C4::Context->preference('BakerTaylorEnabled')) {
@ -1058,7 +1058,7 @@ $template->{VARS}->{'trackclicks'} = C4::Context->preference('TrackClicks');
if ( C4::Context->preference('UseCourseReserves') ) {
foreach my $i ( @items ) {
$i->{'course_reserves'} = GetItemReservesInfo( itemnumber => $i->{'itemnumber'} );
$i->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $i->{'itemnumber'} );
}
}

2
t/db_dependent/CourseReserves.t

@ -70,7 +70,7 @@ ok( $course_reserve->{'cr_id'} eq $cr_id, "GetCourseReserve returns valid data"
my $course_reserves = GetCourseReserves( 'course_id' => $course_id );
ok( $course_reserves->[0]->{'ci_id'} eq $ci_id, "GetCourseReserves returns valid data." );
my $info = GetItemReservesInfo( itemnumber => $items[0]->{'itemnumber'} );
my $info = GetItemCourseReservesInfo( itemnumber => $items[0]->{'itemnumber'} );
ok( $info->[0]->{'itemnumber'} eq $items[0]->{'itemnumber'}, "GetItemReservesInfo returns valid data." );
DelCourseReserve( 'cr_id' => $cr_id );

Loading…
Cancel
Save