Index: themes/garland/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.63
diff -u -r1.63 style.css
--- themes/garland/style.css	17 Aug 2009 19:05:26 -0000	1.63
+++ themes/garland/style.css	26 Aug 2009 19:46:20 -0000
@@ -757,7 +757,7 @@
   margin: -1.5em -31px 1.75em;
   padding: 1.5em 31px;
 }
-#aggregator .feed-item-categories {
+#aggregator .feed-item-categories, .feed-item-enclosure {
   font-size: 0.92em;
 }
 #aggregator .feed-item-meta {
Index: modules/aggregator/aggregator.parser.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.parser.inc,v
retrieving revision 1.4
diff -u -r1.4 aggregator.parser.inc
--- modules/aggregator/aggregator.parser.inc	15 Jul 2009 21:32:43 -0000	1.4
+++ modules/aggregator/aggregator.parser.inc	26 Aug 2009 19:46:19 -0000
@@ -44,6 +44,7 @@
     }
 
     $etag = empty($feed->http_headers['ETag']) ? '' : $feed->http_headers['ETag'];
+
     // Update the feed data.
     db_merge('aggregator_feed')
       ->key(array('fid' => $feed->fid))
@@ -68,7 +69,6 @@
 
     watchdog('aggregator', 'There is new syndicated content from %site.', array('%site' => $feed->title));
     drupal_set_message(t('There is new syndicated content from %site.', array('%site' => $feed->title)));
-
   }
 }
 
@@ -111,7 +111,7 @@
   $feed->items = array();
   foreach ($items as $item) {
 
-    // Prepare the item:
+    // Prepare the item.
     foreach ($item as $key => $value) {
       $item[$key] = trim($value);
     }
@@ -149,6 +149,13 @@
       $item['description'] = $item['content'];
     }
 
+    // Set enclosure information.
+    if (!isset($item['enclosure_url'])) {
+      $item['enclosure_url'] = '';
+      $item['enclosure_length'] = 0;
+      $item['enclosure_type'] = '';
+    }
+
     // Try to resolve and parse the item's publication date.
     $date = '';
     foreach (array('pubdate', 'dc:date', 'dcterms:issued', 'dcterms:created', 'dcterms:modified', 'issued', 'created', 'modified', 'published', 'updated') as $key) {
@@ -196,6 +203,13 @@
     case 'info':
       $element = $name;
       break;
+    case 'enclosure':
+      if ($element == 'item' && !empty($attributes['URL']) && !empty($attributes['LENGTH']) && !empty($attributes['TYPE'])) {
+        $items[$item]['enclosure_url'] = $attributes['URL'];
+        $items[$item]['enclosure_length'] = $attributes['LENGTH'];
+        $items[$item]['enclosure_type'] = $attributes['TYPE'];
+      }
+      break;
     case 'id':
       if ($element != 'item') {
         $element = $name;
Index: modules/aggregator/aggregator-item.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator-item.tpl.php,v
retrieving revision 1.2
diff -u -r1.2 aggregator-item.tpl.php
--- modules/aggregator/aggregator-item.tpl.php	15 May 2008 21:27:32 -0000	1.2
+++ modules/aggregator/aggregator-item.tpl.php	26 Aug 2009 19:46:18 -0000
@@ -37,6 +37,12 @@
   </div>
 <?php endif; ?>
 
+<?php if (isset($enclosure_url)) : ?>
+  <div class="feed-item-enclosure">
+    <?php print t('Enclosure'); ?>: <a href="<?php print $enclosure_url; ?>"><?php print $enclosure_url; ?></a>
+  </div>
+<?php endif; ?>
+
 <?php if ($categories) : ?>
   <div class="feed-item-categories">
     <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.25
diff -u -r1.25 aggregator.install
--- modules/aggregator/aggregator.install	2 Aug 2009 08:16:16 -0000	1.25
+++ modules/aggregator/aggregator.install	26 Aug 2009 19:46:19 -0000
@@ -249,6 +249,24 @@
         'size' => 'big',
         'description' => 'Body of the feed item.',
       ),
+      'enclosure_url' => array(
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => TRUE,
+        'default' => '',
+        'description' => t('URL to the enclosure.'),
+      ),
+      'enclosure_length' => array(
+        'type' => 'int',
+        'not null' => FALSE,
+        'description' => t('Length of the enclosure in bytes.'),
+      ),
+      'enclosure_type' => array(
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => FALSE,
+        'description' => t('Type of the enclosure, should be a standard MIME type.'),
+      ),
       'timestamp' => array(
         'type' => 'int',
         'not null' => FALSE,
@@ -281,9 +299,22 @@
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
 /**
- * Add aggregator teaser length to settings from old global default teaser length
+ * Add aggregator teaser length to settings from old global default teaser length.
  */
 function aggregator_update_7001() {
   variable_set('aggregator_teaser_length', variable_get('teaser_length'));
 }
+
+/**
+ * Add enclosure related fields to aggregator_item table.
+ */
+function aggregator_update_7002() {
+  $ret = array();
+  db_add_field($ret, 'aggregator_item', 'enclosure_url', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''));
+  db_add_field($ret, 'aggregator_item', 'enclosure_length', array('type' => 'int', 'not null' => FALSE));
+  db_add_field($ret, 'aggregator_item', 'enclosure_type', array('type' => 'varchar', 'length' => 32, 'not null' => FALSE));
+
+  return $ret;
+}
Index: modules/aggregator/aggregator.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v
retrieving revision 1.32
diff -u -r1.32 aggregator.pages.inc
--- modules/aggregator/aggregator.pages.inc	24 Aug 2009 17:11:42 -0000	1.32
+++ modules/aggregator/aggregator.pages.inc	26 Aug 2009 19:46:19 -0000
@@ -287,6 +287,10 @@
     $variables['source_date'] = format_date($item->timestamp, 'custom', variable_get('date_format_medium', 'D, m/d/Y - H:i'));
   }
 
+  if (!empty($item->enclosure_url)) {
+    $variables['enclosure_url'] = $item->enclosure_url;
+  }
+
   $variables['categories'] = array();
   foreach ($item->categories as $category) {
     $variables['categories'][$category->cid] = l($category->title, 'aggregator/categories/' . $category->cid);
Index: modules/aggregator/aggregator.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.css,v
retrieving revision 1.2
diff -u -r1.2 aggregator.css
--- modules/aggregator/aggregator.css	27 May 2007 17:57:47 -0000	1.2
+++ modules/aggregator/aggregator.css	26 Aug 2009 19:46:18 -0000
@@ -20,7 +20,7 @@
 #aggregator .feed-item-meta, #aggregator .feed-item-body {
   margin-bottom: 0.5em;
 }
-#aggregator .feed-item-categories {
+#aggregator .feed-item-categories .feed-item-enclosure {
   font-size: 0.9em;
 }
 #aggregator td {
Index: modules/aggregator/aggregator.processor.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.processor.inc,v
retrieving revision 1.10
diff -u -r1.10 aggregator.processor.inc
--- modules/aggregator/aggregator.processor.inc	14 Jul 2009 10:42:11 -0000	1.10
+++ modules/aggregator/aggregator.processor.inc	26 Aug 2009 19:46:19 -0000
@@ -38,7 +38,7 @@
         if (!$item['timestamp']) {
           $item['timestamp'] = isset($entry->timestamp) ? $entry->timestamp : REQUEST_TIME;
         }
-        aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid : ''), 'fid' => $feed->fid, 'timestamp' => $item['timestamp'], 'title' => $item['title'], 'link' => $item['link'], 'author' => $item['author'], 'description' => $item['description'], 'guid' => $item['guid']));
+        aggregator_save_item(array('iid' => (isset($entry->iid) ? $entry->iid : ''), 'fid' => $feed->fid, 'timestamp' => $item['timestamp'], 'title' => $item['title'], 'link' => $item['link'], 'author' => $item['author'], 'description' => $item['description'], 'enclosure_url' => $item['enclosure_url'], 'enclosure_length' => $item['enclosure_length'], 'enclosure_type' => $item['enclosure_type'], 'guid' => $item['guid']));
       }
     }
   }
@@ -144,6 +144,9 @@
         'link' => $edit['link'],
         'author' => $edit['author'],
         'description' => $edit['description'],
+        'enclosure_url' => $edit['enclosure_url'],
+        'enclosure_length' => $edit['enclosure_length'],
+        'enclosure_type' => $edit['enclosure_type'],
         'guid' => $edit['guid'],
         'timestamp' => $edit['timestamp'],
         'fid' => $edit['fid'],
@@ -159,7 +162,7 @@
       ->execute();
   }
   elseif ($edit['title'] && $edit['link']) {
-    // file the items in the categories indicated by the feed
+    // File the items in the categories indicated by the feed.
     $result = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = :fid', array(':fid' => $edit['fid']));
     foreach ($result as $category) {
       db_merge('aggregator_category_item')
