? 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.14 diff -u -p -r1.14 aggregator.install --- modules/aggregator/aggregator.install 18 Dec 2007 12:59:20 -0000 1.14 +++ modules/aggregator/aggregator.install 7 Feb 2008 09:47:46 -0000 @@ -216,8 +216,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.'), ), Index: modules/aggregator/aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v retrieving revision 1.374 diff -u -p -r1.374 aggregator.module --- modules/aggregator/aggregator.module 15 Jan 2008 08:06:32 -0000 1.374 +++ modules/aggregator/aggregator.module 7 Feb 2008 09:47:47 -0000 @@ -823,15 +823,14 @@ 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']); + drupal_write_record("aggregator_item", $edit, 'iid'); } else if ($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']); } else if ($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']); - $edit['iid'] = db_last_insert_id('aggregator_item', 'iid'); + drupal_write_record("aggregator_item", $edit); // file the items in the categories indicated by the feed $categories = db_query('SELECT cid FROM {aggregator_category_feed} WHERE fid = %d', $edit['fid']); while ($category = db_fetch_object($categories)) { Index: modules/aggregator/aggregator.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.pages.inc,v retrieving revision 1.12 diff -u -p -r1.12 aggregator.pages.inc --- modules/aggregator/aggregator.pages.inc 8 Jan 2008 10:35:40 -0000 1.12 +++ modules/aggregator/aggregator.pages.inc 7 Feb 2008 09:47:47 -0000 @@ -250,7 +250,7 @@ function template_preprocess_aggregator_ $variables['feed_url'] = check_url($item->link); $variables['feed_title'] = check_plain($item->title); - $variables['content'] = aggregator_filter_xss($item->description); + $variables['content'] = aggregator_filter_xss(db_decode_blob($item->description)); $variables['source_url'] = ''; $variables['source_title'] = ''; @@ -357,6 +357,7 @@ function theme_aggregator_page_rss($feed $items = ''; $feed_length = variable_get('feed_item_length', 'teaser'); foreach ($feeds as $feed) { + $feed->description = db_decode_blob($feed->description); switch ($feed_length) { case 'teaser': $teaser = node_teaser($feed->description); Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.14 diff -u -p -r1.14 block.admin.inc --- modules/block/block.admin.inc 22 Dec 2007 23:24:24 -0000 1.14 +++ modules/block/block.admin.inc 7 Feb 2008 09:47:48 -0000 @@ -298,8 +298,8 @@ function block_add_block_form_validate($ * Save the new custom block. */ function block_add_block_form_submit($form, &$form_state) { - db_query("INSERT INTO {boxes} (body, info, format) VALUES ('%s', '%s', %d)", $form_state['values']['body'], $form_state['values']['info'], $form_state['values']['format']); - $delta = db_last_insert_id('boxes', 'bid'); + drupal_write_record('boxes', $form_state['values']); + $delta = $form_state['values']['bid']; foreach (list_themes() as $key => $theme) { if ($theme->status) { Index: modules/block/block.install =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.install,v retrieving revision 1.8 diff -u -p -r1.8 block.install --- modules/block/block.install 18 Dec 2007 12:59:20 -0000 1.8 +++ modules/block/block.install 7 Feb 2008 09:47:48 -0000 @@ -147,7 +147,7 @@ function block_schema() { 'description' => t("The block's {blocks}.bid."), ), 'body' => array( - 'type' => 'text', + 'type' => 'blob', 'not null' => FALSE, 'size' => 'big', 'description' => t('Block contents.'), Index: modules/block/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.module,v retrieving revision 1.299 diff -u -p -r1.299 block.module --- modules/block/block.module 3 Feb 2008 19:12:57 -0000 1.299 +++ modules/block/block.module 7 Feb 2008 09:47:48 -0000 @@ -212,7 +212,7 @@ function block_block($op = 'list', $delt case 'view': $block = db_fetch_object(db_query('SELECT body, format FROM {boxes} WHERE bid = %d', $delta)); - $data['content'] = check_markup($block->body, $block->format, FALSE); + $data['content'] = check_markup(db_decode_blob($block->body), $block->format, FALSE); return $data; } } @@ -319,7 +319,7 @@ function block_box_form($edit = array()) $form['body_field']['body'] = array( '#type' => 'textarea', '#title' => t('Block body'), - '#default_value' => $edit['body'], + '#default_value' => db_decode_blob($edit['body']), '#rows' => 15, '#description' => t('The content of the block as shown to the user.'), '#weight' => -17, @@ -337,7 +337,8 @@ function block_box_save($edit, $delta) { $edit['format'] = FILTER_FORMAT_DEFAULT; } - db_query("UPDATE {boxes} SET body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['body'], $edit['info'], $edit['format'], $delta); + $edit['bid'] = $delta; + drupal_write_record('boxes', $edit, 'bid'); return TRUE; } Index: modules/comment/comment.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v retrieving revision 1.4 diff -u -p -r1.4 comment.admin.inc --- modules/comment/comment.admin.inc 8 Jan 2008 10:35:41 -0000 1.4 +++ modules/comment/comment.admin.inc 7 Feb 2008 09:47:48 -0000 @@ -64,7 +64,7 @@ function comment_admin_overview($type = while ($comment = db_fetch_object($result)) { $comments[$comment->cid] = ''; $comment->name = $comment->uid ? $comment->registered_name : $comment->name; - $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128), 'fragment' => 'comment-'. $comment->cid))); + $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8(db_decode_blob($comment->comment), 128), 'fragment' => 'comment-'. $comment->cid))); $form['username'][$comment->cid] = array('#value' => theme('username', $comment)); $form['node_title'][$comment->cid] = array('#value' => l($comment->node_title, 'node/'. $comment->nid)); $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small')); Index: modules/comment/comment.install =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v retrieving revision 1.19 diff -u -p -r1.19 comment.install --- modules/comment/comment.install 16 Jan 2008 21:45:30 -0000 1.19 +++ modules/comment/comment.install 7 Feb 2008 09:47:48 -0000 @@ -106,8 +106,9 @@ function comment_schema() { 'description' => t('The comment title.'), ), 'comment' => array( - 'type' => 'text', + 'type' => 'blob', 'not null' => TRUE, + 'default' => '', 'size' => 'big', 'description' => t('The comment body.'), ), Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.618 diff -u -p -r1.618 comment.module --- modules/comment/comment.module 6 Feb 2008 19:38:27 -0000 1.618 +++ modules/comment/comment.module 7 Feb 2008 09:47:49 -0000 @@ -615,7 +615,7 @@ function comment_nodeapi(&$node, $op, $a $text = ''; $comments = db_query('SELECT subject, comment, format FROM {comments} WHERE nid = %d AND status = %d', $node->nid, COMMENT_PUBLISHED); while ($comment = db_fetch_object($comments)) { - $text .= '

'. check_plain($comment->subject) .'

'. check_markup($comment->comment, $comment->format, FALSE); + $text .= '

'. check_plain($comment->subject) .'

'. check_markup(db_decode_blob($comment->comment), $comment->format, FALSE); } return $text; @@ -698,7 +698,7 @@ function comment_save($edit) { ); if ($edit['cid']) { // Update the comment in the database. - db_query("UPDATE {comments} SET status = %d, timestamp = %d, subject = '%s', comment = '%s', format = %d, uid = %d, name = '%s', mail = '%s', homepage = '%s' WHERE cid = %d", $edit['status'], $edit['timestamp'], $edit['subject'], $edit['comment'], $edit['format'], $edit['uid'], $edit['name'], $edit['mail'], $edit['homepage'], $edit['cid']); + drupal_write_record('comments', $edit, 'cid'); // Allow modules to respond to the updating of a comment. comment_invoke_comment($edit, 'update'); @@ -758,8 +758,9 @@ function comment_save($edit) { $edit['name'] = $user->name; } - db_query("INSERT INTO {comments} (nid, pid, uid, subject, comment, format, hostname, timestamp, status, thread, name, mail, homepage) VALUES (%d, %d, %d, '%s', '%s', %d, '%s', %d, %d, '%s', '%s', '%s', '%s')", $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], ip_address(), $edit['timestamp'], $edit['status'], $thread, $edit['name'], $edit['mail'], $edit['homepage']); - $edit['cid'] = db_last_insert_id('comments', 'cid'); + $edit['hostname'] = ip_address(); + $edit['thread'] = $thread; + drupal_write_record('comments', $edit); // Tell the other modules a new comment has been submitted. comment_invoke_comment($edit, 'insert'); @@ -1571,7 +1572,7 @@ function theme_comment_view($comment, $n // Switch to folded/unfolded view of the comment if ($visible) { - $comment->comment = check_markup($comment->comment, $comment->format, FALSE); + $comment->comment = check_markup(db_decode_blob($comment->comment), $comment->format, FALSE); // Comment API hook comment_invoke_comment($comment, 'view'); @@ -2093,7 +2094,7 @@ function comment_unpublish_by_keyword_ac */ function comment_unpublish_by_keyword_action($comment, $context) { foreach ($context['keywords'] as $keyword) { - if (strstr($comment->comment, $keyword) || strstr($comment->subject, $keyword)) { + if (strstr(db_decode_blob($comment->comment), $keyword) || strstr($comment->subject, $keyword)) { db_query('UPDATE {comments} SET status = %d WHERE cid = %d', COMMENT_NOT_PUBLISHED, $comment->cid); watchdog('action', 'Unpublished comment %subject.', array('%subject' => $comment->subject)); break; Index: modules/contact/contact.install =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.install,v retrieving revision 1.10 diff -u -p -r1.10 contact.install --- modules/contact/contact.install 18 Dec 2007 12:59:21 -0000 1.10 +++ modules/contact/contact.install 7 Feb 2008 09:47:49 -0000 @@ -48,8 +48,9 @@ function contact_schema() { 'description' => t('Comma-separated list of recipient e-mail addresses.'), ), 'reply' => array( - 'type' => 'text', + 'type' => 'blob', 'not null' => TRUE, + 'default' => '', 'size' => 'big', 'description' => t('Text of the auto-reply message.'), ), Index: modules/contact/contact.module =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v retrieving revision 1.103 diff -u -p -r1.103 contact.module --- modules/contact/contact.module 16 Jan 2008 12:46:52 -0000 1.103 +++ modules/contact/contact.module 7 Feb 2008 09:47:49 -0000 @@ -172,7 +172,7 @@ function contact_mail($key, &$message, $ case 'page_autoreply': $contact = $params['contact']; $message['subject'] .= t('[!category] !subject', array('!category' => $contact['category'], '!subject' => $params['subject']), $language->language); - $message['body'][] = $contact['reply']; + $message['body'][] = db_decode_blob($contact['reply']); break; case 'user_mail': case 'user_copy': Index: modules/contact/contact.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v retrieving revision 1.6 diff -u -p -r1.6 contact.pages.inc --- modules/contact/contact.pages.inc 16 Jan 2008 22:56:21 -0000 1.6 +++ modules/contact/contact.pages.inc 7 Feb 2008 09:47:49 -0000 @@ -138,7 +138,7 @@ function contact_mail_page_submit($form, } // Send an auto-reply if necessary using the current language. - if ($contact['reply']) { + if (db_decode_blob($contact['reply'])) { drupal_mail('contact', 'page_autoreply', $from, $language, $values, $contact['recipients']); } Index: modules/node/node.install =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.install,v retrieving revision 1.4 diff -u -p -r1.4 node.install --- modules/node/node.install 18 Dec 2007 12:59:21 -0000 1.4 +++ modules/node/node.install 7 Feb 2008 09:47:50 -0000 @@ -212,13 +212,15 @@ function node_schema() { 'default' => ''), 'body' => array( 'description' => t('The body of this version.'), - 'type' => 'text', + 'type' => 'blob', 'not null' => TRUE, + 'default' => '', 'size' => 'big'), 'teaser' => array( 'description' => t('The teaser of this version.'), - 'type' => 'text', + 'type' => 'blob', 'not null' => TRUE, + 'default' => '', 'size' => 'big'), 'log' => array( 'description' => t('The log entry explaining the changes in this version.'), Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.947 diff -u -p -r1.947 node.module --- modules/node/node.module 3 Feb 2008 19:41:47 -0000 1.947 +++ modules/node/node.module 7 Feb 2008 09:47:50 -0000 @@ -749,6 +749,9 @@ function node_load($param = array(), $re $node = db_fetch_object(db_query('SELECT '. $fields .' FROM {node} n INNER JOIN {users} u ON u.uid = n.uid INNER JOIN {node_revisions} r ON r.vid = n.vid WHERE '. $cond, $arguments)); } + $node->body = db_decode_blob($node->body); + $node->teaser = db_decode_blob($node->teaser); + if ($node && $node->nid) { // Call the node specific callback (if any) and piggy-back the // results to the node or overwrite some values.