Bugzilla – Attachment 23101 Details for
Bug 11061
Koha::Calendar::_mock_init is unused
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11061: Koha::Calendar::_mock_init is unused
Bug-11061-KohaCalendarmockinit-is-unused.patch (text/plain), 2.03 KB, created by
Kyle M Hall (khall)
on 2013-11-22 18:24:06 UTC
(
hide
)
Description:
Bug 11061: Koha::Calendar::_mock_init is unused
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-11-22 18:24:06 UTC
Size:
2.03 KB
patch
obsolete
>From b1d5502457cecd843aff1cf1ed42deb0e59898d0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 16 Oct 2013 13:55:22 +0200 >Subject: [PATCH] Bug 11061: Koha::Calendar::_mock_init is unused > >Bug 9209 removes the only occurrence to Koha::Calendar::_mock_init >The routine can be removed. > >Test plan: >prove t/Calendar.t > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >I left that routine because I planned to do a follow-up for that so the >Calendar patch series was pushed soon. Nice catch Jonathan, works as expected. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Passes koha-qa.pl, t and xt >--- > Koha/Calendar.pm | 29 ----------------------------- > 1 files changed, 0 insertions(+), 29 deletions(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index 6a12530..b52ae5f 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -18,10 +18,6 @@ sub new { > my $o = lc $o_name; > $self->{$o} = $options{$o_name}; > } >- if ( exists $options{TEST_MODE} ) { >- $self->_mockinit(); >- return $self; >- } > if ( !defined $self->{branchcode} ) { > croak 'No branchcode argument passed to Koha::Calendar->new'; > } >@@ -297,31 +293,6 @@ sub hours_between { > > } > >-sub _mockinit { >- my $self = shift; >- $self->{weekly_closed_days} = [ 1, 0, 0, 0, 0, 0, 0 ]; # Sunday only >- $self->{day_month_closed_days} = { 6 => { 16 => 1, } }; >- my $dates = []; >- $self->{exception_holidays} = >- DateTime::Set->from_datetimes( dates => $dates ); >- my $special = DateTime->new( >- year => 2011, >- month => 6, >- day => 1, >- time_zone => 'Europe/London', >- ); >- push @{$dates}, $special; >- $self->{single_holidays} = DateTime::Set->from_datetimes( dates => $dates ); >- >- # if not defined, days_mode defaults to 'Calendar' >- if ( !defined($self->{days_mode}) ) { >- $self->{days_mode} = 'Calendar'; >- } >- >- $self->{test} = 1; >- return; >-} >- > sub set_daysmode { > my ( $self, $mode ) = @_; > >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11061
:
22018
|
22434
| 23101