Index: contrib/image_gallery/image_gallery.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_gallery/image_gallery.install,v
retrieving revision 1.10
diff -u -r1.10 image_gallery.install
--- contrib/image_gallery/image_gallery.install	22 Jan 2009 12:17:20 -0000	1.10
+++ contrib/image_gallery/image_gallery.install	3 May 2009 15:14:24 -0000
@@ -6,6 +6,34 @@
 }
 
 /**
+ * Implementation of hook_enable().
+ */
+function image_gallery_enable() {
+  if ($vocabulary = taxonomy_vocabulary_load(variable_get('image_gallery_nav_vocabulary', 0))) {
+    // Existing install. Add back image node type, if the gallery
+    // vocabulary still exists. Keep all other node types intact there.
+    $vocabulary = (array) $vocabulary;
+    $vocabulary['nodes']['image'] = 1;
+    taxonomy_save_vocabulary($vocabulary);
+  }
+  else {
+    // Create the gallery vocabulary if it does not exist.
+    $vocabulary = array(
+      'name' => t('Image Galleries'),
+      'multiple' => '0',
+      'required' => '0',
+      'hierarchy' => '1',
+      'relations' => '0',
+      'module' => 'image_gallery',
+      'nodes' => array('image' => 1)
+    );
+    taxonomy_save_vocabulary($vocabulary);
+
+    variable_set('image_gallery_nav_vocabulary', $vocabulary['vid']);
+  }
+}
+
+/**
  * Implementation of hook_requirements().
  */
 function image_gallery_requirements($phase) {
