diff --git a/modules/block/block.module b/modules/block/block.module index bcbf77360c3..c52cf51435d 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -202,9 +202,7 @@ function block_block_configure($delta = 0, $edit = array()) { if ($delta) { $box = block_box_get($delta); } - if (filter_access($box['format'])) { - return block_box_form($box); - } + return block_box_form($box); } /** @@ -388,16 +386,13 @@ function block_box_form($edit = array()) { '#description' => t('The content of the block as shown to the user.'), '#required' => TRUE, '#weight' => -17, + '#access' => filter_access($edit['format']), ); return $form; } function block_box_save($edit, $delta) { - if (!filter_access($edit['body_format'])) { - $edit['body_format'] = FILTER_FORMAT_DEFAULT; - } - db_query("UPDATE {box} SET body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['body'], $edit['info'], $edit['body_format'], $delta); return TRUE; diff --git a/modules/block/block.test b/modules/block/block.test index 2c456739cb0..b6b1dd54bb7 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -85,6 +85,18 @@ class BlockTestCase extends DrupalWebTestCase { // Confirm that the box is being displayed using configured text format. $this->assertRaw('