? sites/default/modules ? sites/default/settings.php Index: modules/comment/comment.install =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v retrieving revision 1.26 diff -u -p -r1.26 comment.install --- modules/comment/comment.install 17 Sep 2008 07:11:56 -0000 1.26 +++ modules/comment/comment.install 8 Oct 2008 17:11:03 -0000 @@ -109,6 +109,16 @@ function comment_update_7001() { } /** + * Remap {comments}.comment as BLOB type. + */ +function comment_update_7002() { + $ret = array(); + db_change_field($ret, 'comments', 'comment', 'comment', array('type' => 'blob', 'not null' => FALSE, 'size' => 'big')); + + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ @@ -151,8 +161,8 @@ function comment_schema() { 'description' => t('The comment title.'), ), 'comment' => array( - 'type' => 'text', - 'not null' => TRUE, + 'type' => 'blob', + 'not null' => FALSE, '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.654 diff -u -p -r1.654 comment.module --- modules/comment/comment.module 6 Oct 2008 12:55:54 -0000 1.654 +++ modules/comment/comment.module 8 Oct 2008 17:11:04 -0000 @@ -680,7 +680,10 @@ 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['comment_format'], $edit['uid'], $edit['name'], $edit['mail'], $edit['homepage'], $edit['cid']); + $edit += array( + 'format' => $edit['comment_format'] + ); + drupal_write_record('comments', $edit, 'cid'); // Allow modules to respond to the updating of a comment. comment_invoke_comment($edit, 'update'); // Add an entry to the watchdog log. @@ -733,8 +736,12 @@ 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['comment_format'], ip_address(), $edit['timestamp'], $edit['status'], $thread, $edit['name'], $edit['mail'], $edit['homepage']); - $edit['cid'] = db_last_insert_id('comments', 'cid'); + $edit += array( + 'format' => $edit['comment_format'], + 'hostname' => ip_address(), + 'thread' => $thread + ); + drupal_write_record('comments', $edit); // Tell the other modules a new comment has been submitted. comment_invoke_comment($edit, 'insert'); // Add an entry to the watchdog log.