Commit 67de4f67 authored by Dries's avatar Dries
Browse files

- Usablity improvement: check whether the comment module is enabled. If not,

  show an error message.
parent 298b403b
......@@ -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 ' ';
}
}
......
......@@ -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 ' ';
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment