From bbcda38577b6940fcca2985eeda1f966b9571cf3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 6 Feb 2024 14:37:46 +0000 Subject: [PATCH] Bug 35972: Tidy for QA scripts --- C4/CourseReserves.pm | 18 +++++++++--------- .../bootstrap/en/includes/masthead.inc | 6 +++--- opac/opac-thesis-table-details.pl | 7 ++++--- opac/opac-thesis-tables.pl | 5 +++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm index ef71e4b3cf2..27e7e3615ce 100644 --- a/C4/CourseReserves.pm +++ b/C4/CourseReserves.pm @@ -1026,7 +1026,7 @@ sub SearchCourses { my $term = $params{'term'}; - my $enabled = $params{'enabled'} || '%'; + my $enabled = $params{'enabled'} || '%'; my $thesis_table = $params{'thesis_table'} || 'no'; my @params; @@ -1059,15 +1059,15 @@ sub SearchCourses { "; if ( $thesis_table eq 'no' ) { - $query .= " - AND - c.department != 'TT' - "; + $query .= " + AND + c.department != 'TT' + "; } else { - $query .= " - AND - c.department = 'TT' - "; + $query .= " + AND + c.department = 'TT' + "; } $query .= " diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 56e27586500..b58360aec7f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -431,9 +431,9 @@ - + [% END %] [% END %] [% IF ( Koha.Preference('OPACShowLibraries') && AllPublicBranches.size > 0 ) %] diff --git a/opac/opac-thesis-table-details.pl b/opac/opac-thesis-table-details.pl index fd82176d1c7..07b69c6e3ca 100755 --- a/opac/opac-thesis-table-details.pl +++ b/opac/opac-thesis-table-details.pl @@ -22,7 +22,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth qw( get_template_and_user ); +use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::Koha; @@ -31,7 +31,8 @@ use C4::CourseReserves qw(GetCourse GetCourseReserves); my $cgi = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { template_name => "opac-thesis-table-details.tt", + { + template_name => "opac-thesis-table-details.tt", query => $cgi, type => "opac", authnotrequired => 1, @@ -43,7 +44,7 @@ my $table_id = $cgi->param('table_id'); die("No table_id given") unless ($table_id); -my $course = GetCourse($table_id); +my $course = GetCourse($table_id); my $course_reserves = GetCourseReserves( course_id => $table_id, include_items => 1, include_count => 1 ); $template->param( diff --git a/opac/opac-thesis-tables.pl b/opac/opac-thesis-tables.pl index 32321cd4c12..e9a044bd0f6 100755 --- a/opac/opac-thesis-tables.pl +++ b/opac/opac-thesis-tables.pl @@ -22,7 +22,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth qw( get_template_and_user ); +use C4::Auth qw( get_template_and_user ); use C4::Output qw( output_html_with_http_headers ); use C4::CourseReserves qw(SearchCourses); @@ -30,7 +30,8 @@ use C4::CourseReserves qw(SearchCourses); my $cgi = CGI->new; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { template_name => "opac-thesis-tables.tt", + { + template_name => "opac-thesis-tables.tt", query => $cgi, type => "opac", authnotrequired => 1, -- 2.53.0