diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-03 05:54:25 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-03-03 05:54:25 +0000 |
commit | 4a9b9f4acadeea58bc4f67bf1f9d5c6d4f96d41f (patch) | |
tree | 00abf115804658bc41d099f5665ccd6815b4275e | |
parent | 84b7defc072692e428e11fa233fd63956f4277d2 (diff) | |
download | brdo-4a9b9f4acadeea58bc4f67bf1f9d5c6d4f96d41f.tar.gz brdo-4a9b9f4acadeea58bc4f67bf1f9d5c6d4f96d41f.tar.bz2 |
- Block admin usability: display block title if no description was given.
-rw-r--r-- | modules/block.module | 4 | ||||
-rw-r--r-- | modules/block/block.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/block.module b/modules/block.module index 1685d89fd..495135941 100644 --- a/modules/block.module +++ b/modules/block.module @@ -86,7 +86,7 @@ function block_block($op = 'list', $delta = 0, $edit = array()) { case 'list': $result = db_query('SELECT bid, title, info FROM {boxes} ORDER BY title'); while ($block = db_fetch_object($result)) { - $blocks[$block->bid]['info'] = $block->info; + $blocks[$block->bid]['info'] = $block->info ? $block->info : $block->title; } return $blocks; @@ -333,7 +333,7 @@ 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 .= 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 <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block')))); + $output .= form_textfield(t('Block description'), 'info', $edit['info'], 50, 64, t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block')))); return $output; } diff --git a/modules/block/block.module b/modules/block/block.module index 1685d89fd..495135941 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -86,7 +86,7 @@ function block_block($op = 'list', $delta = 0, $edit = array()) { case 'list': $result = db_query('SELECT bid, title, info FROM {boxes} ORDER BY title'); while ($block = db_fetch_object($result)) { - $blocks[$block->bid]['info'] = $block->info; + $blocks[$block->bid]['info'] = $block->info ? $block->info : $block->title; } return $blocks; @@ -333,7 +333,7 @@ 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 .= 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 <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block')))); + $output .= form_textfield(t('Block description'), 'info', $edit['info'], 50, 64, t('A brief description of your block. Used on the <a href="%overview">block overview page</a>.', array('%overview' => url('admin/block')))); return $output; } |