From 03f8b9691b0db25abf605475d4556624d824becd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 28 Aug 2012 08:09:46 -0400 Subject: [PATCH] Bug 8215 - Add Course Reserves - Followup - One Hit Searching Bugfix Content-Type: text/plain; charset="utf-8" When searching courses, a search that results in a single hit will automatically forward to the details for that course. If only a single course has been added to the system, Koha will always forward to that course and there will be no way to get to course-reserves.pl to add a second course! Fixed by testing for an actual search, rather than looking only at the number of hits returned. --- course_reserves/course-reserves.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl index 91d6e3e..8907460 100755 --- a/course_reserves/course-reserves.pl +++ b/course_reserves/course-reserves.pl @@ -46,7 +46,7 @@ if ($search_on) { } my $courses = GetCourses(%params); -if ( @$courses == 1 ) { +if ( $search_on && @$courses == 1 ) { print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=" . $courses->[0]->{'course_id'}); } else { $template->param( courses => $courses ); -- 1.7.2.5