--- creativecommons_org.module	2010-02-23 13:15:08.000000000 -0700
+++ creativecommons.module	2010-05-10 11:14:00.000000000 -0600
@@ -93,6 +93,13 @@ function creativecommons_menu() {
     'weight' => 20,
   );
   
+    $items['admin/settings/creativecommons/import/bulk'] = array(
+    'title' => 'Import',
+    'page callback' => 'creativecommons_bulk_convert',
+    'access arguments' => array('administer creative commons'),
+    'type' => MENU_CALLBACK,
+  );
+  
   return $items;
 }
 
@@ -518,6 +525,14 @@ function creativecommons_import_form() {
     '#options' => $options,
   );
   
+  $html = '[' . l('Bulk Convert Creative Commons Licenses', 'admin/settings/creativecommons/import/bulk') . ']<br /><br />';
+
+  $form['creativecommons_lite']['bulk'] = array(
+    '#type' => 'markup',
+    '#title' => t('Convert Creative Commons Licenses'),
+    '#value' => $html,
+  );
+  
   return system_settings_form($form);
 }
 
@@ -2181,3 +2196,24 @@ function creativecommons_views_api() {
   );
 }
 
+/**
+ * Basic bulk conversion of creativecommons_lite licenses
+ */
+
+//http://creativecommons.org/licenses/by-nc/3.0/us/
+
+function creativecommons_bulk_convert(){
+
+$result = db_query("SELECT * FROM {creativecommons_lite}", $nid);
+
+while ($row = db_fetch_object($result)) {
+    if ($row->license) {
+      $node = node_load($row->nid);
+      $new_license = 'http://creativecommons.org/licenses/' . $row->license . '/3.0/us/';
+      print l($node->title, 'node/' . $row->nid ) . ' - converting ' . $row->license . ' -> ' .  $new_license;
+      //insert new license record
+      db_query("INSERT INTO {creativecommons_node}  (nid, license_uri) VALUES (%d, '%s')", $row->nid, $new_license);
+    }
+  }
+}
+
