--- bookingsapi_org.module	2008-10-07 10:46:58.000000000 -0400
+++ bookingsapi.module	2008-10-07 10:18:09.000000000 -0400
@@ -226,12 +226,12 @@ function bookingsapi_interval_build($ins
  *  All recurrences formatted as DATETIMEs
  */
 function bookingsapi_parse_rrule(&$record, &$exceptions, &$intervals) {
-  if(empty($record['rrule']) || strpos($record['rrule'],'FREQ=NONE')) {
-    $record['rrule'] = '';
+  if(empty($record['ical_rrule']) || strpos($record['ical_rrule'],'FREQ=NONE')) {
+    $record['ical_rrule'] = '';
     $intervals = array( array($record['start'], $record['end']) );
   } else {
-    $exceptions = bookingsapi_rrule_exdates($record['rrule']);
-    $intervals = date_repeat_calc($record['rrule'], $record['start'], $record['rrule_until'], $exceptions);
+    $exceptions = bookingsapi_rrule_exdates($record['ical_rrule']);
+    $intervals = date_repeat_calc($record['ical_rrule'], $record['start'], $record['ical_rrule_until'], $exceptions);
     $intervals = bookingsapi_interval_build($intervals, $record['start'], $record['end']);
   }
 }
@@ -337,9 +337,9 @@ function bookingsapi_rrule_until_as_dt($
  */
 function _bookingsapi_record_instances_save(&$record) {
   if (empty($record['record_id'])) return;
-  if(!empty($record['rrule'])) {
-    $exceptions = bookingsapi_rrule_exdates($record['rrule']);
-    $instance_dates = date_repeat_calc($record['rrule'], $record['start'], $record['rrule_until'], $exceptions);
+  if(!empty($record['ical_rrule'])) {
+    $exceptions = bookingsapi_rrule_exdates($record['ical_rrule']);
+    $instance_dates = date_repeat_calc($record['ical_rrule'], $record['start'], $record['ical_rrule_until'], $exceptions);
   } else {
     $instance_dates = array($record['start']);
   }
@@ -358,7 +358,7 @@ function _bookingsapi_record_instances_s
   $cur_instance = db_fetch_array(db_query($sql));
   $cur_count = $cur_instance ? $cur_instance['count'] : 0;
 
-  if (empty($record['rrule']) && $cur_count > 0) {
+  if (empty($record['ical_rrule']) && $cur_count > 0) {
     // if the RRULE is empty, delete all instances of it except the original
     $sql = "DELETE FROM {bookings_schedules} WHERE record_id=%d AND start!='%s'";
     db_query($sql, $record['record_id'], $record['start']);
@@ -468,7 +468,7 @@ function bookingsapi_booking_save(&$book
  *  BOOKINGSAPI_TIME_CONFLICT if there is a time conflict
  */
 function bookingsapi_record_save(&$record) {
-  $record['rrule_until'] = bookingsapi_rrule_until_as_dt($record['rrule']);
+  $record['ical_rrule_until'] = bookingsapi_rrule_until_as_dt($record['ical_rrule']);
 
   // TODO: lock and unlock tables: this is a critical procedure
 
@@ -517,9 +517,9 @@ function bookingsapi_instance_delete($in
   if(empty($instance['record_id'])) $instance = bookingsapi_instance_load($instance['instance_id']);
   // get the record for the instance
   $parent = bookingsapi_record_load($instance['record_id']);
-  if(!empty($record['rrule'])) {
+  if(!empty($record['ical_rrule'])) {
     // this is one instance of many; update the parent's EXDATE to reflect the deletion
-    $rrule = explode("\n", $parent['rrule']);
+    $rrule = explode("\n", $parent['ical_rrule']);
     $exception = substr($instance['start'], 0, 11) . '00:00:00'; // reset time according to RFC spec
     $exception = date_convert($exception, DATE_DATETIME, DATE_ICAL);
     if (array_key_exists(1, $rrule)) {
@@ -528,7 +528,7 @@ function bookingsapi_instance_delete($in
       $rrule[1] = 'EXDATE:' . $exception; // create new
     }
     $rrule = implode("\n",$rrule);
-    db_query("UPDATE {bookings_records} SET rrule='%s' WHERE record_id=%d LIMIT 1", $rrule, $instance['record_id']);
+    db_query("UPDATE {bookings_records} SET ical_rrule='%s' WHERE record_id=%d LIMIT 1", $rrule, $instance['record_id']);
   } else {
     // deleting the one and only instance of a record, so delete record also
     db_query('DELETE FROM {bookings_records} WHERE record_id=%d LIMIT 1', $instance['record_id']);
