From 0d239e4e6f3c7095173773252dc9ce38b48c0799 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 20 Mar 2017 07:22:41 -0400 Subject: [PATCH] Bug 18264 - (QA Followup) Remove use of GetBiblioFromItemNumber Replace with (blank) Signed-off-by: Jonathan Druart Signed-off-by: Brendan A Gallagher --- course_reserves/add_items.pl | 7 +++++-- .../prog/en/modules/course_reserves/add_items-step2.tt | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/course_reserves/add_items.pl b/course_reserves/add_items.pl index ef8605f89d..fc705e1928 100755 --- a/course_reserves/add_items.pl +++ b/course_reserves/add_items.pl @@ -26,6 +26,7 @@ use C4::Auth; use C4::Output; use C4::Koha; use C4::Biblio; +use Koha::Items; use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve); @@ -37,7 +38,8 @@ my $barcode = $cgi->param('barcode') || ''; my $return = $cgi->param('return') || ''; my $itemnumber = ($cgi->param('itemnumber') && $action eq 'lookup') ? $cgi->param('itemnumber') : ''; -my $item = GetBiblioFromItemNumber( $itemnumber, $barcode ); +my $item = Koha::Items->find( { ( $itemnumber ? ( itemnumber => $itemnumber ) : ( barcode => $barcode ) ) } ); +my $title = ($item) ? $item->biblio->title : undef; my $step = ( $action eq 'lookup' && $item ) ? '2' : '1'; @@ -50,7 +52,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( flagsrequired => { coursereserves => 'add_reserves' }, } ); -my $inumber = $itemnumber ? " (itemnumber:$itemnumber)" : ""; +my $inumber = $itemnumber ? "(blank) (itemnumber:$itemnumber)" : ""; $template->param( ERROR_BARCODE_NOT_FOUND => $barcode . $inumber ) unless ( $barcode && !$itemnumber && $item && $action eq 'lookup' ); @@ -68,6 +70,7 @@ if ( $action eq 'lookup' ) { $template->param( item => $item, + title => $title, course_item => $course_item, course_reserve => $course_reserve, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt index 3286640e06..bc5831a7ec 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt @@ -9,7 +9,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
@@ -23,7 +23,7 @@
- Add [% item.title %] to [% course.course_name %] + Add [% title %] to [% course.course_name %]
  1. Barcode: -- 2.39.5