diff options
Diffstat (limited to 'modules/aggregator/aggregator.module')
-rw-r--r-- | modules/aggregator/aggregator.module | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 9319ad9b8..686f4248a 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -18,7 +18,7 @@ function aggregator_help($path, $arg) { case 'admin/help#aggregator': $output = ''; $output .= '<h3>' . t('About') . '</h3>'; - $output .= '<p>' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the online handbook entry for <a href="@aggregator-module">Aggregator module</a>.', array('@aggregator-module' => 'http://drupal.org/handbook/modules/aggregator', '@aggregator' => url('aggregator'))) . '</p>'; + $output .= '<p>' . t('The Aggregator module is an on-site syndicator and news reader that gathers and displays fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines in feeds, using a number of standardized XML-based formats. For more information, see the online handbook entry for <a href="@aggregator-module">Aggregator module</a>.', array('@aggregator-module' => 'http://drupal.org/documentation/modules/aggregator', '@aggregator' => url('aggregator'))) . '</p>'; $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Viewing feeds') . '</dt>'; @@ -397,6 +397,7 @@ function aggregator_block_view($delta = '') { if (user_access('access news feeds')) { $block = array(); list($type, $id) = explode('-', $delta); + $result = FALSE; switch ($type) { case 'feed': if ($feed = db_query('SELECT fid, title, block FROM {aggregator_feed} WHERE block <> 0 AND fid = :fid', array(':fid' => $id))->fetchObject()) { @@ -414,9 +415,12 @@ function aggregator_block_view($delta = '') { } break; } + $items = array(); - foreach ($result as $item) { - $items[] = theme('aggregator_block_item', array('item' => $item)); + if (!empty($result)) { + foreach ($result as $item) { + $items[] = theme('aggregator_block_item', array('item' => $item)); + } } // Only display the block if there are items to show. |