}
// Get recurrence data from the event add-on
- $this->regEventData['recurrences'] = apply_filters('glm-member-db-events-get-event-times', $this->regEventData['event']);
+// $this->regEventData['recurrences'] = apply_filters('glm-member-db-events-get-event-times', $this->regEventData['event']);
// If we don't have recurrences for the event
- if (!is_array($this->regEventData['recurrences']) || count($this->regEventData['recurrences']) == 0) {
- return false;
- }
+// if (!is_array($this->regEventData['recurrences']) || count($this->regEventData['recurrences']) == 0) {
+// return false;
+// }
// Get the first and last times in the reg_times entries
$firstTime = false;
if (!is_array($this->regEventData['reg_time']) || count($this->regEventData['reg_time']) == 0) {
return false;
}
+
/*
// Check reg_time array
$timeSpecific = $this->regEventData['time_specific']['value'];
// If we don't have any rates for this class, remove the class
if (!is_array($regClass['reg_rate']) || count($regClass['reg_rate']) == 0) {
- unset($this->regEventData['reg_class'][$regCLassKey]);
+ unset($this->regEventData['reg_class'][$regClassKey]);
} else {
- $this->regEventData['reg_class'][$regCLassKey]['times'] = array();
- $this->regEventData['reg_class'][$regCLassKey]['non_time_specific_time'] = array();
- $this->regEventData['reg_class'][$regCLassKey]['hasTimes'] = false;
+ $this->regEventData['reg_class'][$regClassKey]['times'] = array();
+ $this->regEventData['reg_class'][$regClassKey]['non_time_specific_time'] = array();
+ $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = false;
// For each event time except non-time-specific entry
foreach ($this->regEventData['reg_time'] as $regTimeKey=>$regTime) {
$regRate['rate_id'] = $regRate['id'];
unset($regRate['id']);
- $this->regEventData['reg_class'][$regCLassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
- $this->regEventData['reg_class'][$regCLassKey]['hasTimes'] = true;
+ $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
+ $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
}
}
}
- // If event time is for time-specific event (might be either mixed in)
+ // If event time is for non-time-specific event
if ($regTime['non_time_specific']) {
// Try to find a current rate for this time - within the start and end days before this time
$regRate['rate_id'] = $regRate['id'];
unset($regRate['id'], $regRate['reg_event']);
- $this->regEventData['reg_class'][$regCLassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
- $this->regEventData['reg_class'][$regCLassKey]['hasTimes'] = true;
+ $this->regEventData['reg_class'][$regClassKey]['times'][$regTime['event_time']] = array_merge($regTime, $regRate);
+ $this->regEventData['reg_class'][$regClassKey]['hasTimes'] = true;
}
}
} // Have rates for this class
// Drop the rate supplied rate data that's now merged with time and saved with the class.
- unset($this->regEventData['reg_class'][$ck]['reg_rate']);
+// unset($this->regEventData['reg_class'][$regClassKey]['reg_rate']);
} // for each class
unset($this->regEventData['recurrences']);
// Get rid of the provided reg_time entries - No longer needed
- unset($this->regEventData['reg_time']);
+// oops! unset($this->regEventData['reg_time']);
// echo "<pre>".print_r($this->regEventData,1)."</pre>";