diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-26 14:32:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-26 14:32:27 +0000 |
commit | 9f70b717e56c8bc816dd5119e2830d668037d5cc (patch) | |
tree | 0cb7dc7ca632e90cc78d8ce65856ef6bbb74169f /modules/forum/forum.install | |
parent | 96bfc650bc1f4430654575b8872e77c90bb8d50c (diff) | |
download | brdo-9f70b717e56c8bc816dd5119e2830d668037d5cc.tar.gz brdo-9f70b717e56c8bc816dd5119e2830d668037d5cc.tar.bz2 |
- Patch #613272 by Kevin Hankens, Dave Reid, yoroy, rgristroph, pcarman: forums not usable out-of-the-box: disabled comments, no forums.
Diffstat (limited to 'modules/forum/forum.install')
-rw-r--r-- | modules/forum/forum.install | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install index 7e6de833a..65841a4a1 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -20,6 +20,9 @@ function forum_install() { variable_set('node_options_forum', array('status')); } +/** + * Implements hook_enable(). + */ function forum_enable() { // Create the forum vocabulary if it does not exist. $vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', 0)); @@ -66,6 +69,16 @@ function forum_enable() { field_create_instance($instance); variable_set('forum_nav_vocabulary', $vocabulary->vid); + + // Create a default forum so forum posts can be created. + $edit = array( + 'name' => t('General discussion'), + 'description' => '', + 'parent' => array(0), + 'vid' => $vocabulary->vid, + ); + $term = (object) $edit; + taxonomy_term_save($term); } } |