Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
date_ical
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
drupal.org
date_ical
Commits
611e78b8
Commit
611e78b8
authored
Aug 21, 2013
by
Robert Rollins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue [#2070883]: UID algorithm now generates random UIDs.
parent
e140e80f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
includes/date_ical_plugin_row_ical_entity.inc
includes/date_ical_plugin_row_ical_entity.inc
+5
-1
includes/date_ical_plugin_row_ical_fields.inc
includes/date_ical_plugin_row_ical_fields.inc
+3
-2
No files found.
includes/date_ical_plugin_row_ical_entity.inc
View file @
611e78b8
...
...
@@ -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'
])
{
...
...
includes/date_ical_plugin_row_ical_fields.inc
View file @
611e78b8
...
...
@@ -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 u
id
.
// Generate a u
nique 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'
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment