Index: modules/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block.module,v retrieving revision 1.162 diff -u -F^f -r1.162 block.module --- modules/block.module 4 Apr 2005 12:27:05 -0000 1.162 +++ modules/block.module 9 Apr 2005 06:26:11 -0000 @@ -351,7 +351,7 @@ function block_box_delete($bid = 0) { } function block_box_form($edit = array()) { - $output = form_textfield(t('Block title'), 'title', $edit['title'], 50, 64, t('The title of the block as shown to the user.')); + $output = form_textfield(t('Block title'), 'title', preg_replace('/$/U', '', $edit['title']), 50, 64, t('The title of the block as shown to the user.')); $output .= filter_form('format', $edit['format']); $output .= form_textarea(t('Block body'), 'body', $edit['body'], 70, 10, t('The content of the block as shown to the user.')); $output .= form_textfield(t('Block description'), 'info', $edit['info'], 50, 64, t('A brief description of your block. Used on the block overview page.', array('%overview' => url('admin/block')))); @@ -360,6 +360,10 @@ function block_box_form($edit = array()) } function block_box_save($edit, $delta = NULL) { + if (empty($edit['title']) || db_num_rows(db_query("SELECT title FROM {boxes} WHERE title='%s'", $edit['title']))) { + $edit['title'] .= ""; + } + if (!filter_access($edit['format'])) { $edit['format'] = FILTER_FORMAT_DEFAULT; }