Index: geotaxonomy.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geotaxonomy/geotaxonomy.install,v
retrieving revision 1.1.2.1.2.1
diff -u -p -r1.1.2.1.2.1 geotaxonomy.install
--- geotaxonomy.install	24 Jun 2010 14:04:46 -0000	1.1.2.1.2.1
+++ geotaxonomy.install	29 Jul 2010 21:58:32 -0000
@@ -154,3 +154,20 @@ function geotaxonomy_update_6001() {
   }
   return $ret;
 }
+
+/**
+ * Migrate geotaxonomy settings storage.
+ */
+function geotaxonomy_update_6003() {
+  $vocabularies = taxonomy_get_vocabularies();
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+  foreach ($vocabularies as $voc) {
+    if (variable_get("geotaxonomy_$voc->vid", 0)) {
+      $vocabulary_settings[$voc->vid] = TRUE;
+    }
+    variable_del("geotaxonomy_$voc->vid");
+  }
+  variable_set('geotaxonomy_vocabularies', $vocabulary_settings);
+  
+  return array();
+}
Index: geotaxonomy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/geotaxonomy/geotaxonomy.module,v
retrieving revision 1.2.2.5.2.5
diff -u -p -r1.2.2.5.2.5 geotaxonomy.module
--- geotaxonomy.module	27 Jul 2010 18:13:48 -0000	1.2.2.5.2.5
+++ geotaxonomy.module	29 Jul 2010 21:58:32 -0000
@@ -10,12 +10,11 @@
  * Adds option of geo storage to vocab edit page.
  */
 function geotaxonomy_form_taxonomy_form_vocabulary_alter(&$form, &$form_state) {
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
   $form['settings']['geotaxonomy_status'] = array(
     '#type' => 'checkbox',
     '#title' => t('Store geo data for this vocabulary'),
-    '#default_value' => !empty($form['vid']) ?
-      variable_get("geotaxonomy_" . $form['vid']['#value'], 0)
-      : FALSE,
+    '#default_value' => !empty($form['vid']) ? $vocabulary_settings[$form['vid']['#value']] : FALSE,
     '#description' => t('Allows latitude and longitude data to be stored with terms of this taxonomy.'),
   );
   $form['#submit'][]   = 'geotaxonomy_form_vocabulary_submit';
@@ -26,7 +25,9 @@ function geotaxonomy_form_taxonomy_form_
  */
 function geotaxonomy_form_vocabulary_submit($form, &$form_state) {
   $vid = $form_state['values']['vid'];
-  variable_set("geotaxonomy_$vid", $form_state['values']['geotaxonomy_status']);
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+  $vocabulary_settings[$vid] = $form_state['values']['geotaxonomy_status'];
+  variable_set('geotaxonomy_vocabularies', $vocabulary_settings);
 }
 
 /**
@@ -35,7 +36,8 @@ function geotaxonomy_form_vocabulary_sub
  */
 function geotaxonomy_form_taxonomy_form_term_alter(&$form, &$form_state) {
   $vid = $form['vid']['#value'];
-  if (!variable_get("geotaxonomy_".$vid, 0)) {
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+  if (!$vocabulary_settings[$vid]) {
     return;
   }
   $form['submit']['#weight'] = isset($form['submit']['#weight']) ? $form['submit']['#weight'] + 1 : 1;
@@ -135,7 +137,8 @@ function geotaxonomy_get_term($tid) {
  * Implementation of hook_taxonomy().
  */
 function geotaxonomy_taxonomy($op = NULL, $type = NULL, $term = NULL){
-  if($type =='term' && $term && variable_get("geotaxonomy_".$term['vid'], 0)) {
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+  if($type =='term' && $term && $vocabulary_settings[$term['vid']]) {
     switch ($op) {
       case 'delete':
         db_query("DELETE FROM {term_geo} WHERE tid = %d", $term['tid']);
@@ -195,7 +198,8 @@ function geotaxonomy_feeds_taxonomy_load
  * $term['lon'] and so forth.
  */
 function geotaxonomy_feeds_term_processor_targets_alter(&$targets, $vid) {
-  if (variable_get('geotaxonomy_'. $vid, FALSE)) {
+  $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+  if ($vocabulary_settings[$vid]) {
     $targets['lat'] = array(
       'name' => t('Latitude'),
       'description' => t('Latitude of the geo term.'),
@@ -245,10 +249,11 @@ function geotaxonomy_feeds_term_processo
  * Rebuild term hierarchy after import.
  */
 function geotaxonomy_feeds_after_import($importer, $source) {
-  if ($importer->processor instanceOf FeedsTermProcessor && $importer->processor->config['vocabulary']) {
-    if (variable_get('geotaxonomy_'. $importer->processor->config['vocabulary'], FALSE)) {
-
-      geotaxonomy_rebuild_hierarchy($importer->processor->config['vocabulary']);
+  $vid = $importer->processor->config['vocabulary'];
+  if ($importer->processor instanceOf FeedsTermProcessor && $vid) {
+    $vocabulary_settings = variable_get('geotaxonomy_vocabularies', array());
+    if ($vocabulary_settings[$vid]) {
+      geotaxonomy_rebuild_hierarchy($vid);
       drupal_set_message(t('Rebuilt term hierarchy.'));
     }
   }
