fixed: Optional pubDate RSS field generates warnings when missing

This commit is contained in:
Graham Knop 2008-03-21 22:01:40 +00:00
parent d3b85ef723
commit b6a4aad7c6
2 changed files with 5 additions and 5 deletions

View file

@ -11,6 +11,7 @@
- fixed: Changing name of Matrix listing leaves discussion forum with old name - fixed: Changing name of Matrix listing leaves discussion forum with old name
- fixed: Importing a package can break when updating a pending asset - fixed: Importing a package can break when updating a pending asset
- fixed: errors on package importing are always reported as corrupted packages - fixed: errors on package importing are always reported as corrupted packages
- fixed: Optional pubDate RSS field generates warnings when missing
7.5.7 7.5.7
- fixed: HttpProxy mixes original site's content encoding with WebGUI's - fixed: HttpProxy mixes original site's content encoding with WebGUI's

View file

@ -425,12 +425,11 @@ sub _assign_rss_dates {
$item->{date} = $date; $item->{date} = $date;
} }
else { else {
if (my $pubDate = $session->datetime->mailToEpoch($item->{pubDate})) { my $pubDate;
$item->{date} = $pubDate; if ($item->{pubDate}) {
} $pubDate = $session->datetime->mailToEpoch($item->{pubDate});
else {
$item->{date} = $session->datetime->time() - (60 * 60 * 24 * 365); # handicap the undated
} }
$item->{date} = $pubDate || $session->datetime->time() - (60 * 60 * 24 * 365); # handicap the undated
$cache->set($item->{date}, '1 year'); $cache->set($item->{date}, '1 year');
} }
} }