Lines 48-60
sub _init {
Link Here
|
48 |
$self->{day_month_closed_days}->{ $tuple->{day} }->{ $tuple->{month} } = |
48 |
$self->{day_month_closed_days}->{ $tuple->{day} }->{ $tuple->{month} } = |
49 |
1; |
49 |
1; |
50 |
} |
50 |
} |
|
|
51 |
|
51 |
my $special = $dbh->prepare( |
52 |
my $special = $dbh->prepare( |
52 |
'SELECT day, month, year, title, description FROM special_holidays WHERE ( branchcode = ? ) AND (isexception = ?)' |
53 |
'SELECT day, month, year FROM special_holidays WHERE branchcode = ? AND isexception = ?' |
53 |
); |
54 |
); |
54 |
$special->execute( $branch, 1 ); |
55 |
$special->execute( $branch, 1 ); |
55 |
my $dates = []; |
56 |
my $dates = []; |
56 |
while ( my ( $day, $month, $year, $title, $description ) = |
57 |
while ( my ( $day, $month, $year ) = $special->fetchrow ) { |
57 |
$special->fetchrow ) { |
|
|
58 |
push @{$dates}, |
58 |
push @{$dates}, |
59 |
DateTime->new( |
59 |
DateTime->new( |
60 |
day => $day, |
60 |
day => $day, |
Lines 65-74
sub _init {
Link Here
|
65 |
} |
65 |
} |
66 |
$self->{exception_holidays} = |
66 |
$self->{exception_holidays} = |
67 |
DateTime::Set->from_datetimes( dates => $dates ); |
67 |
DateTime::Set->from_datetimes( dates => $dates ); |
68 |
$special->execute( $branch, 1 ); |
68 |
|
|
|
69 |
$special->execute( $branch, 0 ); |
69 |
$dates = []; |
70 |
$dates = []; |
70 |
while ( my ( $day, $month, $year, $title, $description ) = |
71 |
while ( my ( $day, $month, $year ) = $special->fetchrow ) { |
71 |
$special->fetchrow ) { |
|
|
72 |
push @{$dates}, |
72 |
push @{$dates}, |
73 |
DateTime->new( |
73 |
DateTime->new( |
74 |
day => $day, |
74 |
day => $day, |
Lines 78-85
sub _init {
Link Here
|
78 |
)->truncate( to => 'day' ); |
78 |
)->truncate( to => 'day' ); |
79 |
} |
79 |
} |
80 |
$self->{single_holidays} = DateTime::Set->from_datetimes( dates => $dates ); |
80 |
$self->{single_holidays} = DateTime::Set->from_datetimes( dates => $dates ); |
81 |
$self->{days_mode} = C4::Context->preference('useDaysMode'); |
81 |
$self->{days_mode} = C4::Context->preference('useDaysMode'); |
82 |
$self->{test} = 0; |
82 |
$self->{test} = 0; |
83 |
return; |
83 |
return; |
84 |
} |
84 |
} |
85 |
|
85 |
|
86 |
- |
|
|