From 7b1969f53702dd9d83c3eec8b88fce7aec9b419d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 15 Oct 2014 06:09:07 -0400 Subject: [PATCH] Bug 8133 [QA Followup] - Fix koha-qa.pl violations --- C4/Calendar.pm | 2 +- Koha/Calendar.pm | 8 ++-- .../intranet-tmpl/prog/en/includes/tools-menu.inc | 2 +- .../prog/en/modules/tools/calendar.tt | 50 +++++++++---------- misc/cronjobs/staticfines.pl | 2 +- tools/calendar.pl | 4 +- 6 files changed, 33 insertions(+), 35 deletions(-) diff --git a/C4/Calendar.pm b/C4/Calendar.pm index 7131b56..ffd238c 100644 --- a/C4/Calendar.pm +++ b/C4/Calendar.pm @@ -90,7 +90,7 @@ sub GetWeeklyEvents { (open_hour = 0 AND open_minute = 0 AND close_hour = 0 AND close_minute = 0) AS closed FROM calendar_repeats WHERE branchcode = ? AND weekday IS NOT NULL - }, { Slice => {} }, $branchcode ); + }, { Slice => {} }, $branchcode ); } =head2 GetYearlyEvents diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index 77db08a..aafd639 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -36,7 +36,7 @@ sub _init { (open_hour = 0 AND open_minute = 0 AND close_hour = 0 AND close_minute = 0) AS closed FROM calendar_repeats WHERE branchcode = ? AND weekday IS NOT NULL - }, 'weekday', { Slice => {} }, $branch ); + }, 'weekday', { Slice => {} }, $branch ); my $day_month_hours = $dbh->selectall_arrayref( q{ SELECT @@ -111,7 +111,7 @@ sub addHours { my $day_len = $hours->{open_time} - $base_date; if ( DateTime::Duration->compare( $day_len, $hours_duration, $base_date ) > 0 ) { - if ( $self->{days_mode} eq 'Calendar' ) { + if ( $self->{days_mode} eq 'Calendar' ) { return $hours->{open_time}; } @@ -140,7 +140,7 @@ sub addHours { my $day_len = $hours->{close_time} - $base_date; if ( DateTime::Duration->compare( $day_len, $hours_duration, $base_date ) < 0 ) { - if ( $self->{days_mode} eq 'Calendar' ) { + if ( $self->{days_mode} eq 'Calendar' ) { return $hours->{close_time}; } @@ -356,7 +356,7 @@ sub hours_between { return $end_dt - $start_dt if ( $start_dt->ymd eq $end_dt->ymd ); my $duration = DateTime::Duration->new; - + $duration->add_duration( $start_hours->{close_time} - $start_dt ) if ( $start_dt < $start_hours->{close_time} ); for (my $date = $start_dt->clone->truncate( to => 'day' )->add( days => 1 ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index 916195c..d492a32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -87,7 +87,7 @@
Additional tools