summaryrefslogtreecommitdiff
path: root/modules/forum/forum.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-10 15:52:56 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-10 15:52:56 +0000
commit318436d19936fff46b0379929fa77edf4903bbf8 (patch)
treee500d33cf554fb026330a349fdc82345f5c33d7b /modules/forum/forum.install
parentc2f26d3368d38ce4d73aa0089d09d2d78ccf9285 (diff)
downloadbrdo-318436d19936fff46b0379929fa77edf4903bbf8.tar.gz
brdo-318436d19936fff46b0379929fa77edf4903bbf8.tar.bz2
- Patch #619904 by nenne: fixed forum.module doesn't uninstall cleanly.
Diffstat (limited to 'modules/forum/forum.install')
-rw-r--r--modules/forum/forum.install10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index ae0ee3e50..9848a42f6 100644
--- a/modules/forum/forum.install
+++ b/modules/forum/forum.install
@@ -21,11 +21,14 @@ function forum_install() {
}
function forum_enable() {
+ // Get info on the field "taxonomy_forums".
+ $field_check = field_info_field("taxonomy_forums");
if ($vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', 0))) {
// Save the vocabulary to create the default field instance.
taxonomy_vocabulary_save($vocabulary);
}
- else {
+ // Create fields if info on "taxonomy_forums" field turns out empty.
+ elseif (empty($field_check)) {
// 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.
@@ -63,12 +66,7 @@ function forum_uninstall() {
// Load the dependent Taxonomy module, in case it has been disabled.
drupal_load('module', 'taxonomy');
- // Delete the vocabulary.
- $vid = variable_get('forum_nav_vocabulary', 0);
- taxonomy_vocabulary_delete($vid);
-
variable_del('forum_containers');
- variable_del('forum_nav_vocabulary');
variable_del('forum_hot_topic');
variable_del('forum_per_page');
variable_del('forum_order');