diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-01 19:51:06 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-01 19:51:06 +0000 |
commit | 424250196a65b48919de50b2a3327f67c076e0d3 (patch) | |
tree | 83b9cae1c024bd391d15f8faeee7595985fca4d7 /modules/aggregator/aggregator.module | |
parent | 4a6243aff27d5f26189e0e9eff2039fe0cdbb754 (diff) | |
download | brdo-424250196a65b48919de50b2a3327f67c076e0d3.tar.gz brdo-424250196a65b48919de50b2a3327f67c076e0d3.tar.bz2 |
- Patch #279516 by c960657: removed many PHP4-isms. Great patch.
Diffstat (limited to 'modules/aggregator/aggregator.module')
-rw-r--r-- | modules/aggregator/aggregator.module | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 104e2146e..d918022ec 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -695,9 +695,7 @@ function aggregator_refresh($feed) { } if (!empty($image['LINK']) && !empty($image['URL']) && !empty($image['TITLE'])) { - // TODO: we should really use theme_image() here, but that only works with - // local images. It won't work with images fetched with a URL unless PHP version > 5. - $image = '<a href="' . check_url($image['LINK']) . '" class="feed-image"><img src="' . check_url($image['URL']) . '" alt="' . check_plain($image['TITLE']) . '" /></a>'; + $image = l(theme('image', $image['URL'], $image['TITLE']), $image['LINK'], array('html' => TRUE)); } else { $image = ''; @@ -864,9 +862,9 @@ function aggregator_parse_feed(&$data, $feed) { } } - $timestamp = strtotime($date); // As of PHP 5.1.0, strtotime returns FALSE on failure instead of -1. + $timestamp = strtotime($date); - if ($timestamp <= 0) { + if ($timestamp === FALSE) { $timestamp = aggregator_parse_w3cdtf($date); // Aggregator_parse_w3cdtf() returns FALSE on failure. } |