From 67de4f67d2fc3f28523558bd0e82a34286a813fe Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 6 Sep 2005 19:38:56 +0000 Subject: - Usablity improvement: check whether the comment module is enabled. If not, show an error message. --- modules/forum/forum.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 530758e2c..7a60101c1 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -319,7 +319,7 @@ function _forum_get_vid() { */ function forum_admin_configure() { system_settings_save(); - + $output .= form_textfield(t('Forum icon path'), 'forum_icon_path', variable_get('forum_icon_path', ''), 30, 255, t('The path to the forum icons. Leave blank to disable icons. Don\'t add a trailing slash. Default icons are available in the "misc" directory. You may use images of whatever size you wish, but it is recommended to use 15x15 or 16x16. ')); $number = drupal_map_assoc(array(5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100, 10000)); $output .= form_select(t('Hot topic threshold'), 'forum_hot_topic', variable_get('forum_hot_topic', 15), $number, t('The number of posts a topic must have to be considered hot.')); @@ -766,7 +766,7 @@ function _forum_new($tid) { function forum_page($tid = 0) { global $user; - if (module_exist('taxonomy')) { + if (module_exist('taxonomy') && module_exist('comment')) { $forum_per_page = variable_get('forum_per_page', 25); $sortby = variable_get('forum_order', 1); @@ -779,8 +779,8 @@ function forum_page($tid = 0) { return theme('forum_display', $forums, $topics, $parents, $tid, $sortby, $forum_per_page); } else { - drupal_set_title(t('Warning')); - return forum_help('admin/settings/forum'); + drupal_set_message(t('The forum module requires both the taxonomy module and the comment module to be enabled and configured.'), 'error'); + return ' '; } } -- cgit v1.2.3