diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-05 12:47:23 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-05 12:47:23 +0000 |
commit | d31c77513b14d3424474bf65d207e6b0f9b585ac (patch) | |
tree | 49f9269e7ec44000dada6cd467599104a7b2172b /modules/forum/forum.install | |
parent | ad96ff71c1c8fe11d0d69452be4cae8889a16bbe (diff) | |
download | brdo-d31c77513b14d3424474bf65d207e6b0f9b585ac.tar.gz brdo-d31c77513b14d3424474bf65d207e6b0f9b585ac.tar.bz2 |
- Patch #329140 by catch, pwolanin: improve consistency of vocabulary API and term API.
Diffstat (limited to 'modules/forum/forum.install')
-rw-r--r-- | modules/forum/forum.install | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install index b53b8f649..d35dd91e6 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -17,13 +17,13 @@ function forum_enable() { // vocabulary still exists. Keep all other node types intact there. $vocabulary = (array) $vocabulary; $vocabulary['nodes']['forum'] = 1; - taxonomy_save_vocabulary($vocabulary); + taxonomy_vocabulary_save($vocabulary); } else { // Create the forum vocabulary if it does not exist. Assign the vocabulary // a low weight so it will appear first in forum topic create and edit // forms. - $vocabulary = array( + $edit = array( 'name' => t('Forums'), 'multiple' => 0, 'required' => 0, @@ -33,9 +33,10 @@ function forum_enable() { 'weight' => -10, 'nodes' => array('forum' => 1), ); - taxonomy_save_vocabulary($vocabulary); + $vocabulary = (object) $edit; + taxonomy_vocabulary_save($vocabulary); - variable_set('forum_nav_vocabulary', $vocabulary['vid']); + variable_set('forum_nav_vocabulary', $vocabulary->vid); } } @@ -47,8 +48,8 @@ function forum_uninstall() { drupal_load('module', 'taxonomy'); // Delete the vocabulary. - $vid = variable_get('forum_nav_vocabulary', ''); - taxonomy_del_vocabulary($vid); + $vid = variable_get('forum_nav_vocabulary', 0); + taxonomy_vocabulary_delete($vid); db_query('DROP TABLE {forum}'); variable_del('forum_containers'); |