summaryrefslogtreecommitdiff
path: root/modules/forum
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forum')
-rw-r--r--modules/forum/forum.install13
-rw-r--r--modules/forum/forum.test5
2 files changed, 9 insertions, 9 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');
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index acad2096a..2dfb55f7b 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -143,10 +143,9 @@ class ForumTestCase extends DrupalWebTestCase {
$this->assertEqual($current_settings->description, $description, t('The description was updated'));
// Restore the original vocabulary.
- $original_settings = (array) $original_settings;
- taxonomy_save_vocabulary($original_settings);
+ taxonomy_vocabulary_save($original_settings);
$current_settings = taxonomy_vocabulary_load($vid, TRUE);
- $this->assertEqual($current_settings->name, $original_settings['name'], 'The original vocabulary settings were restored');
+ $this->assertEqual($current_settings->name, $original_settings->name, 'The original vocabulary settings were restored');
}
/**