From 4a9b9f4acadeea58bc4f67bf1f9d5c6d4f96d41f Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 3 Mar 2005 05:54:25 +0000 Subject: [PATCH] - Block admin usability: display block title if no description was given. --- modules/block.module | 4 ++-- modules/block/block.module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/block.module b/modules/block.module index 1685d89fdec9..495135941cdd 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 block overview page.', 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 block overview page.', array('%overview' => url('admin/block')))); return $output; } diff --git a/modules/block/block.module b/modules/block/block.module index 1685d89fdec9..495135941cdd 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 block overview page.', 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 block overview page.', array('%overview' => url('admin/block')))); return $output; }