Commit 611e78b8 authored by Robert Rollins's avatar Robert Rollins

Issue [#2070883]: UID algorithm now generates random UIDs.

parent e140e80f
......@@ -314,12 +314,16 @@ class date_ical_plugin_row_ical_entity extends views_plugin_row {
$uri = entity_uri($this->entity_type, $entity);
$uri['options']['absolute'] = TRUE;
$event['url'] = url($uri['path'], $uri['options']);
$event['uid'] = !empty($entity->date_id) ? $entity->date_id[0] : $event['url'];
$event['rrule'] = $is_field && array_key_exists('rrule', $date_field) ? $date_field['rrule'] : '';
if ($location) {
$event['location'] = $location;
}
// Generate a unique ID for this event.
$domain = check_plain($_SERVER['SERVER_NAME']);
$uniqid = uniqid(rand(), true);
$event['uid'] = "date_ical.$uniqid@$domain";
// If we are using a repeat rule (and not just multi-day events)
// we remove the item from the entities.
if ($event['rrule']) {
......
......@@ -128,9 +128,10 @@ class date_ical_plugin_row_ical_fields extends views_plugin_row {
$uri['options']['absolute'] = TRUE;
$event['url'] = url($uri['path'], $uri['options']);
// Generate a uid.
// Generate a unique ID for this event.
$domain = check_plain($_SERVER['SERVER_NAME']);
$event['uid'] = "calendar." . $row->{$this->view->base_field} . "." . $this->options['date_field'] . "@" . $domain;
$uniqid = uniqid(rand(), true);
$event['uid'] = "date_ical.$uniqid@$domain";
// Create the primary text fields.
$text_fields['summary'] = $this->get_field($row_index, $this->options['title_field']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment