From 84857caaef467b7c3dfa82404143de8dc41fc858 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 5 Oct 2018 15:18:59 +0200 Subject: [PATCH] Bug 21501: Remove dead code from course reserves module search_on parameter is not used in any templates so course-reserves.pl can be simplified a bit Test plan: 1. Go to course reserves module and verify that it is still working 2. `git grep search_on` should return nothing Signed-off-by: Pierre-Marc Thibault Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- course_reserves/course-reserves.pl | 16 +++----------- .../course_reserves/course-reserves.tt | 21 ------------------- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/course_reserves/course-reserves.pl b/course_reserves/course-reserves.pl index ca666969d4..0a07d4f419 100755 --- a/course_reserves/course-reserves.pl +++ b/course_reserves/course-reserves.pl @@ -39,16 +39,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); -my $search_on = $cgi->param('search_on'); -my %params; -if ($search_on) { - $params{'course_name'} = "%$search_on%"; -} - -my $courses = GetCourses(%params); -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 ); - output_html_with_http_headers $cgi, $cookie, $template->output; -} +my $courses = GetCourses(); +$template->param( courses => $courses ); +output_html_with_http_headers $cgi, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt index a747b9e03e..32ca5653e8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-reserves.tt @@ -29,27 +29,6 @@ [% END %] - -

Courses

-- 2.39.5