? role_expire.migrate.inc.txt
? role_expire_migrate.patch
? role_expire_migrate2.patch
? role_expire_name.patch
Index: role_expire.migrate.inc
===================================================================
RCS file: role_expire.migrate.inc
diff -N role_expire.migrate.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ role_expire.migrate.inc	22 Sep 2009 13:17:18 -0000
@@ -0,0 +1,31 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Role Expire module migration support
+ */
+
+function role_expire_migrate_fields_role($type) {
+  $fields = array(
+    'duration' => t('Role Expire: Duration (in days)'),
+  );
+
+  return $fields;
+}
+
+/**
+ * Implementation of hook_migrate_prepare_role().
+ */
+function role_expire_migrate_complete_role(&$newrole, $tblinfo, $row) {
+  if (isset($newrole['duration'])) {
+    role_expire_set_default_duration($newrole['rid'], $newrole['duration']);
+  }
+}
+
+/**
+ * Implementation of hook_migrate_delete_role().
+ */
+function role_expire_migrate_delete_role($rid) {
+  role_expire_delete_default_duration($rid);
+}
Index: role_expire.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/role_expire/role_expire.module,v
retrieving revision 1.6
diff -b -u -p -r1.6 role_expire.module
--- role_expire.module	21 Sep 2009 10:16:09 -0000	1.6
+++ role_expire.module	22 Sep 2009 13:17:18 -0000
@@ -157,6 +157,15 @@ function role_expire_views_api() {
 }
 
 /**
+ * Implementation of hook_migrate_init().
+ */
+function role_expire_migrate_init() {
+  // Don't load migration support unless we need it
+  $path = drupal_get_path('module', 'role_expire') . '/role_expire.migrate.inc';
+  include_once($path);
+}
+
+/**
  * Implementation of hook_perm().
  */
 function role_expire_perm() {
