View | Details | Raw Unified | Return to bug 13813
Collapse All | Expand All

(-)a/C4/NewsChannels.pm (-5 / +4 lines)
Lines 20-26 package C4::NewsChannels; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Context;
22
use C4::Context;
23
use C4::Dates qw(format_date);
23
use Koha::DateUtils;
24
24
25
use vars qw($VERSION @ISA @EXPORT);
25
use vars qw($VERSION @ISA @EXPORT);
26
26
Lines 135-142 sub get_opac_new { Link Here
135
    $sth->execute($idnew);
135
    $sth->execute($idnew);
136
    my $data = $sth->fetchrow_hashref;
136
    my $data = $sth->fetchrow_hashref;
137
    $data->{$data->{'lang'}} = 1 if defined $data->{lang};
137
    $data->{$data->{'lang'}} = 1 if defined $data->{lang};
138
    $data->{expirationdate} = format_date($data->{expirationdate});
138
    $data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 });
139
    $data->{timestamp}      = format_date($data->{timestamp});
139
    $data->{timestamp}      = output_pref({ dt => dt_from_string( $data->{timestamp} ), dateonly => 1 }) ;
140
    return $data;
140
    return $data;
141
}
141
}
142
142
Lines 209-215 sub GetNewsToDisplay { Link Here
209
    $sth->execute($lang,$branch);
209
    $sth->execute($lang,$branch);
210
    my @results;
210
    my @results;
211
    while ( my $row = $sth->fetchrow_hashref ){
211
    while ( my $row = $sth->fetchrow_hashref ){
212
        $row->{newdate} = format_date($row->{newdate});
212
        $row->{newdate} = output_pref({ dt => dt_from_string( $row->{newdate} ), dateonly => 1 });
213
        push @results, $row;
213
        push @results, $row;
214
    }
214
    }
215
    return \@results;
215
    return \@results;
216
- 

Return to bug 13813