projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 18072: (QA follow-up) Remove warning from tests
[koha.git]
/
C4
/
NewsChannels.pm
diff --git
a/C4/NewsChannels.pm
b/C4/NewsChannels.pm
index
cbcc702
..
a01d279
100644
(file)
--- 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};
$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;
}
$data->{timestamp} = output_pref({ dt => dt_from_string( $data->{timestamp} ), dateonly => 1 }) ;
return $data;
}
@@
-182,7
+182,7
@@
sub get_opac_news {
=head2 GetNewsToDisplay
$news = &GetNewsToDisplay($lang,$branch);
=head2 GetNewsToDisplay
$news = &GetNewsToDisplay($lang,$branch);
- C<$news> is a ref to an array which contain
t
s
+ C<$news> is a ref to an array which contains
all news with expirationdate > today or expirationdate is null
that is applicable for a given branch.
all news with expirationdate > today or expirationdate is null
that is applicable for a given branch.
@@
-205,7
+205,7
@@
sub GetNewsToDisplay {
OR expirationdate = '00-00-0000'
)
AND DATE(timestamp) < DATE_ADD(CURDATE(), INTERVAL 1 DAY)
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?
AND (opac_news.branchcode IS NULL OR opac_news.branchcode = ?)
ORDER BY number
}; # expirationdate field is NOT in ISO format?