? sites/default/files ? sites/default/settings.php Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.19 diff -u -p -r1.19 block.admin.inc --- modules/block/block.admin.inc 16 Jul 2008 21:59:25 -0000 1.19 +++ modules/block/block.admin.inc 26 Aug 2008 16:52:22 -0000 @@ -301,7 +301,11 @@ 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']); + db_insert('boxes')->fields(array( + 'body' => $form_state['values']['body'], + 'info' => $form_state['values']['info'], + 'format' => $form_state['values']['format'] + ))->execute(); $delta = db_last_insert_id('boxes', 'bid'); foreach (list_themes() as $key => $theme) { Index: modules/block/block.install =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.install,v retrieving revision 1.11 diff -u -p -r1.11 block.install --- modules/block/block.install 15 May 2008 21:30:02 -0000 1.11 +++ modules/block/block.install 26 Aug 2008 16:52:22 -0000 @@ -136,8 +136,9 @@ function block_schema() { 'description' => t("The block's {blocks}.bid."), ), 'body' => array( - 'type' => 'text', - 'not null' => FALSE, + 'type' => 'blob', + 'not null' => TRUE, + 'default' => '', 'size' => 'big', 'description' => t('Block contents.'), ), Index: modules/block/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.module,v retrieving revision 1.309 diff -u -p -r1.309 block.module --- modules/block/block.module 21 Aug 2008 19:36:36 -0000 1.309 +++ modules/block/block.module 26 Aug 2008 16:52:22 -0000 @@ -332,7 +332,11 @@ 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); + db_update('boxes')->fields(array( + 'body' => $edit['body'], + 'info' => $edit['info'], + 'format' => $edit['format'] + ))->condition('bid', $delta)->execute(); return TRUE; } Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.261 diff -u -p -r1.261 system.install --- modules/system/system.install 23 Aug 2008 08:15:37 -0000 1.261 +++ modules/system/system.install 26 Aug 2008 16:52:23 -0000 @@ -3051,6 +3051,16 @@ function system_update_7010() { } /** + * Remap {boxes}.body as BLOB type. + */ +function system_update_7011() { + $ret = array(); + db_change_field($ret, 'boxes', 'body', 'body', array('type' => 'blob', 'not null' => TRUE, 'default' => '', 'size' => 'big')); + + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */