? sites/default/files
? sites/default/settings.php
Index: modules/aggregator/aggregator.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.install,v
retrieving revision 1.17
diff -u -p -r1.17 aggregator.install
--- modules/aggregator/aggregator.install	12 Aug 2008 07:00:48 -0000	1.17
+++ modules/aggregator/aggregator.install	25 Aug 2008 17:35:36 -0000
@@ -44,6 +44,7 @@ function aggregator_schema() {
       'description' => array(
         'type' => 'text',
         'not null' => TRUE,
+        'default' => '',
         'size' => 'big',
         'description' => t('Description of the category'),
       ),
@@ -149,12 +150,14 @@ function aggregator_schema() {
       'description' => array(
         'type' => 'text',
         'not null' => TRUE,
+        'default' => '',
         'size' => 'big',
         'description' => t("The parent website's description; comes from the <description> element in the feed."),
       ),
       'image' => array(
         'type' => 'text',
         'not null' => TRUE,
+        'default' => '',
         'size' => 'big',
         'description' => t('An image representing the feed.'),
       ),
@@ -229,8 +232,9 @@ function aggregator_schema() {
         'description' => t('Author of the feed item.'),
       ),
       'description' => array(
-        'type' => 'text',
+        'type' => 'blob',
         'not null' => TRUE,
+        'default' => '',    
         'size' => 'big',
         'description' => t('Body of the feed item.'),
       ),
@@ -263,3 +267,17 @@ function aggregator_update_7000() {
   db_add_field($ret, 'aggregator_feed', 'hash', array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''));
   return $ret;
 }
+
+/**
+ * Remap {aggregator_item}.description as BLOB type.
+ * Also fill in missing default values for not null fields.
+ */
+function aggregator_update_7001() {
+  $ret = array();
+  db_change_field($ret, 'aggregator_category', 'description', 'description', array('type' => 'text', 'not null' => TRUE, 'default' => '', 'size' => 'big'));
+  db_change_field($ret, 'aggregator_feed', 'description', 'description', array('type' => 'text', 'not null' => TRUE, 'default' => '', 'size' => 'big'));
+  db_change_field($ret, 'aggregator_feed', 'image', 'image', array('type' => 'text', 'not null' => TRUE, 'default' => '', 'size' => 'big'));
+  db_change_field($ret, 'aggregator_item', 'description', 'description', array('type' => 'blob', 'not null' => TRUE, 'size' => 'big'));
+
+  return $ret;
+}
Index: modules/aggregator/aggregator.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.389
diff -u -p -r1.389 aggregator.module
--- modules/aggregator/aggregator.module	16 Aug 2008 14:48:17 -0000	1.389
+++ modules/aggregator/aggregator.module	25 Aug 2008 17:35:36 -0000
@@ -836,19 +836,37 @@ function aggregator_parse_feed(&$data, $
  */
 function aggregator_save_item($edit) {
   if ($edit['iid'] && $edit['title']) {
-    db_query("UPDATE {aggregator_item} SET title = '%s', link = '%s', author = '%s', description = '%s', guid = '%s', timestamp = %d WHERE iid = %d", $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['guid'], $edit['timestamp'], $edit['iid']);
+    db_update('aggregator_item')->fields(array(
+      'title' => $edit['title'],
+      'link' => $edit['link'],
+      'author' => $edit['author'],
+      'description' => $edit['description'],
+      'guid' => $edit['guid'],
+      'timestamp' => $edit['timestamp']
+    ))->condition('iid', $edit['iid'])->execute();
   }
   elseif ($edit['iid']) {
-    db_query('DELETE FROM {aggregator_item} WHERE iid = %d', $edit['iid']);
-    db_query('DELETE FROM {aggregator_category_item} WHERE iid = %d', $edit['iid']);
+    db_delete('aggregator_item')->condition('iid', $edit['iid'])->execute();
+    db_delete('aggregator_category_item')->condition('iid', $edit['iid'])->execute();
   }
   elseif ($edit['title'] && $edit['link']) {
-    db_query("INSERT INTO {aggregator_item} (fid, title, link, author, description, timestamp, guid) VALUES (%d, '%s', '%s', '%s', '%s', %d, '%s')", $edit['fid'], $edit['title'], $edit['link'], $edit['author'], $edit['description'], $edit['timestamp'], $edit['guid']);
+    db_insert('aggregator_item')->fields(array(
+      'fid' => $edit['fid'],
+      'title' => $edit['title'],
+      'link' => $edit['link'],
+      'author' => $edit['author'],
+      'description' => $edit['description'],
+      'guid' => $edit['guid'],
+      'timestamp' => $edit['timestamp']
+    ))->execute();
     $edit['iid'] = db_last_insert_id('aggregator_item', 'iid');
     // file the items in the categories indicated by the feed
-    $categories = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = %d', $edit['fid']);
+    $categories = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = :fid', array(':fid' => $edit['fid']));
     while ($category = db_fetch_object($categories)) {
-      db_query('INSERT INTO {aggregator_category_item} (cid, iid) VALUES (%d, %d)', $category->cid, $edit['iid']);
+      db_insert('aggregator_category_item')->fields(array(
+        'cid' => $category->cid,
+        'iid' => $edit['iid']
+      ))->execute();
     }
   }
 }
