? name
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.115
diff -u -F^f -r1.115 bootstrap.inc
--- includes/bootstrap.inc	18 Aug 2006 19:24:52 -0000	1.115
+++ includes/bootstrap.inc	23 Aug 2006 14:18:47 -0000
@@ -312,6 +312,26 @@ function variable_del($name) {
 }
 
 /**
+ * Unset all variables from a specific module namespace.
+ *
+ * @param $module
+ *   The module name prefix.
+ */
+function variable_del_all($module) {
+  global $conf;
+
+  $result = db_query("SELECT * FROM {variable} WHERE name like '%s_%'", $module);
+  while ($variable = db_fetch_object($result)) {
+    $variables[] = $variable->name;
+  }
+  db_query("DELETE FROM {variable} WHERE name like '%s_%'", $module);
+  cache_clear_all('variables');
+  foreach($variables as $name) {
+    unset($conf[$name]);
+  }
+}
+
+/**
  * Retrieve the current page from the cache.
  *
  * Note, we do not serve cached pages when status messages are waiting (from
