Index: views_fastsearch.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_fastsearch/Attic/views_fastsearch.install,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 views_fastsearch.install
--- views_fastsearch.install	13 Jun 2007 19:32:38 -0000	1.1.2.1
+++ views_fastsearch.install	19 Jan 2008 22:02:22 -0000
@@ -17,3 +17,22 @@
   return $ret;
 }
 
+/**
+ * Implementation of hook_uninstall
+ */
+function views_fastsearch_uninstall() {
+  variable_del('search_index_unique');
+  if ($ranking = module_invoke_all('search_ranking')) {
+    // ignore the standard node_rankings
+    // Uses hardcoded list instead of views_fastsearch_search_ranking(), as the function
+    // may skip some if the relevant modules are disabled.
+    $standard_rankings = array('node_rank_relevance', 'node_rank_recent', 'node_rank_comments', 'node_rank_views');
+    foreach ($standard_rankings as $rank => $values) {
+      unset($ranking[$rank]);
+    }
+
+    foreach ($ranking as $rank => $values) {
+      variable_del($rank);
+    }
+  }
+}
