X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FNewsChannels.pm;h=40e70da886f84f20f4b834ecdb3f0be94150c2ba;hb=f45fc4d10b84dfbd8040d12484553db8c87ec45a;hp=cbcc702a4cda9ab94d7bb46dc20a85a68372ab65;hpb=017699c345725ea7012f1b84181dc053e20efd98;p=koha.git diff --git a/C4/NewsChannels.pm b/C4/NewsChannels.pm index cbcc702a4c..40e70da886 100644 --- a/C4/NewsChannels.pm +++ b/C4/NewsChannels.pm @@ -134,7 +134,7 @@ sub get_opac_new { $sth->execute($idnew); my $data = $sth->fetchrow_hashref; $data->{$data->{'lang'}} = 1 if defined $data->{lang}; - $data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 }); + $data->{expirationdate} = output_pref({ dt => dt_from_string( $data->{expirationdate} ), dateonly => 1 }) if ( $data->{expirationdate} ); $data->{timestamp} = output_pref({ dt => dt_from_string( $data->{timestamp} ), dateonly => 1 }) ; return $data; } @@ -205,7 +205,7 @@ sub GetNewsToDisplay { OR expirationdate = '00-00-0000' ) AND DATE(timestamp) < DATE_ADD(CURDATE(), INTERVAL 1 DAY) - AND (lang = '' OR lang = ?) + AND (opac_news.lang = '' OR opac_news.lang = ?) AND (opac_news.branchcode IS NULL OR opac_news.branchcode = ?) ORDER BY number }; # expirationdate field is NOT in ISO format?