From c89b5a3f26c0cfdf3fea3da1d4b56ff19397c31d Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 21 May 2013 10:16:34 -0700 Subject: [PATCH] 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 --- C4/CourseReserves.pm | 6 +++--- catalogue/detail.pl | 4 ++-- opac/opac-detail.pl | 4 ++-- t/db_dependent/CourseReserves.t | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index 39cd3d2..c3e25e6 100644 --- a/C4/CourseReserves.pm +++ b/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; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index e9190d2..ab1df8a 100755 --- a/catalogue/detail.pl +++ b/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" diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 56b014f..9d0851f 100755 --- a/opac/opac-detail.pl +++ b/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'} ); } } diff --git a/t/db_dependent/CourseReserves.t b/t/db_dependent/CourseReserves.t index 776f224..9c3172a 100755 --- a/t/db_dependent/CourseReserves.t +++ b/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 ); -- 1.7.2.5