Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.464
diff -u -p -r1.464 bootstrap.inc
--- includes/bootstrap.inc	13 Jan 2011 01:04:13 -0000	1.464
+++ includes/bootstrap.inc	2 Feb 2011 15:42:12 -0000
@@ -776,6 +776,7 @@ function variable_initialize($conf = arr
  *
  * @see variable_del()
  * @see variable_set()
+ * @see variable_update()
  */
 function variable_get($name, $default = NULL) {
   global $conf;
@@ -798,6 +799,7 @@ function variable_get($name, $default = 
  *
  * @see variable_del()
  * @see variable_get()
+ * @see variable_update()
  */
 function variable_set($name, $value) {
   global $conf;
@@ -821,6 +823,7 @@ function variable_set($name, $value) {
  *
  * @see variable_get()
  * @see variable_set()
+ * @see variable_update()
  */
 function variable_del($name) {
   global $conf;
@@ -834,6 +837,40 @@ function variable_del($name) {
 }
 
 /**
+ * Renames a persistent variable.
+ *
+ * Case-sensitivity of the variable_* functions depends on the database
+ * collation used. To avoid problems, always use lower case for persistent
+ * variable names.
+ *
+ * @param $current_name
+ *   The current name of the variable to change.
+ * @param $new_name
+ *   The new name of the variable to change.
+ *
+ * @see variable_get()
+ * @see variable_set()
+ * @see variable_del()
+ */
+function variable_rename($current_name, $new_name) {
+  global $conf;
+  
+  if (isset($conf[$current_name])) {
+
+    db_update('variable')
+      ->fields(array(
+        'name' => $new_name,
+      ))
+      ->condition('name', $current_name)
+      ->execute();
+    cache_clear_all('variables', 'cache_bootstrap');
+  
+    $conf[$new_name] = $conf[$current_name];
+    unset($conf[$current_name]);
+  }
+}
+
+/**
  * Retrieve the current page from the cache.
  *
  * Note: we do not serve cached pages to authenticated users, or to anonymous
