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
abb798ed
Commit
abb798ed
authored
Oct 28, 2013
by
Robert Rollins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final cleanup pass.
parent
32126161
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
date_ical.install
date_ical.install
+0
-2
date_ical.module
date_ical.module
+7
-6
includes/date_ical_plugin_style_ical_feed.inc
includes/date_ical_plugin_style_ical_feed.inc
+2
-2
libraries/ParserVcalendar.inc
libraries/ParserVcalendar.inc
+2
-2
No files found.
date_ical.install
View file @
abb798ed
<?php
/**
* @file
* Install, update and uninstall functions for the date_ical module.
*
*/
/**
...
...
date_ical.module
View file @
abb798ed
...
...
@@ -206,7 +206,7 @@ function date_ical_feeds_processor_targets_alter(&$targets, $entity_type, $bundl
* converted to "\n\n" and link tags converted to footnotes), and uneeded
* whitespace will be cleaned up.
*
* @param $text
* @param
string
$text
* The text to be sanitized.
*/
function
date_ical_sanitize_text
(
$text
=
''
)
{
...
...
@@ -244,7 +244,8 @@ function date_ical_feeds_set_rrule($source, $entity, $target, $feed_element) {
return
;
}
// Add the RRULE value to the field in $entity.
list
(
$field_name
,
$trash
)
=
explode
(
':'
,
$target
,
2
);
$exploded
=
explode
(
':'
,
$target
,
2
);
$field_name
=
$exploded
[
0
];
module_load_include
(
'inc'
,
'date_api'
,
'date_api_ical'
);
$info
=
field_info_field
(
$field_name
);
foreach
(
$entity
->
{
$field_name
}
as
$lang
=>
$field_array
)
{
...
...
@@ -283,7 +284,7 @@ function date_ical_get_location_fields($base = 'node', $reset = FALSE) {
* This is a cut down version of _date_views_fields() from
* date_views_fields.inc in date_views module.
*
* @return
* @return
array
* array with fieldname, type, and table.
*
* @see date_views_date_views_fields()
...
...
@@ -367,10 +368,10 @@ function date_ical_get_summary_fields($base = 'node', $reset = FALSE) {
* This is a cut down version of _date_views_fields() from
* date_views_fields.inc in date_views module.
*
* @return
* @return
array
* Array with fieldname, type, and table.
*
*
@see date_views_date_views_fields()
* @see date_views_date_views_fields()
*/
function
_date_ical_get_summary_fields
(
$base
=
'node'
)
{
// Make sure $base is never empty.
...
...
@@ -441,7 +442,7 @@ function _date_ical_convert_rrule_for_icalcreator($rrule) {
continue
;
}
if
(
strtoupper
(
$key
)
==
'UNTIL'
)
{
// iCalcreator expects the 'timestamp' to be array key for UNTIL
// iCalcreator expects the 'timestamp' to be array key for UNTIL
.
$value
[
'timestamp'
]
=
strtotime
(
$value
[
'datetime'
]);
}
if
(
strtoupper
(
$key
)
==
'BYDAY'
)
{
...
...
includes/date_ical_plugin_style_ical_feed.inc
View file @
abb798ed
...
...
@@ -53,7 +53,7 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
'rel'
=>
'alternate'
,
'type'
=>
'text/calendar'
,
'title'
=>
$tooltip
,
'href'
=>
$url
'href'
=>
$url
,
));
}
}
...
...
@@ -127,7 +127,7 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
public
function
render
()
{
if
(
empty
(
$this
->
row_plugin
)
||
!
in_array
(
$this
->
row_plugin
->
plugin_name
,
array
(
'date_ical'
,
'date_ical_fields'
)))
{
debug
(
'date_ical_plugin_style_ical_feed: This style plugin supports only the "iCal Entity" and "iCal Fields" row plugins.'
,
NULL
,
TRUE
);
return
t
(
'To enable iCal output, th
is view\'s
Format must be configured to Show: iCal Entity or iCal Fields.'
);
return
t
(
'To enable iCal output, th
e view
Format must be configured to Show: iCal Entity or iCal Fields.'
);
}
if
(
$this
->
row_plugin
->
plugin_name
==
'date_ical_fields'
&&
empty
(
$this
->
row_plugin
->
options
[
'date_field'
]))
{
// Because the Date field is required by the form, this error state will
...
...
libraries/ParserVcalendar.inc
View file @
abb798ed
...
...
@@ -264,7 +264,7 @@ class ParserVcalendar {
// NOTE TO MAINTAINERS:
// This will not work properly if the site is configured to allow users
// to set their own timezone. Unfortunately, there isn't anything that
// Date iCal can do about that, as far as I can tell.
-- coredumperror
// Date iCal can do about that, as far as I can tell.
$datetimezone
=
new
DateTimeZone
(
date_default_timezone_get
());
}
else
{
...
...
@@ -349,7 +349,7 @@ class ParserVcalendar {
// values, so we need to manually pare it down to only the first one.
$vcalendar_component
->
rrule
=
array
(
$vcalendar_component
->
rrule
[
0
]);
}
foreach
(
$vcalendar_component
->
rrule
as
$ndx
=>
&
$rrule_data
)
{
foreach
(
$vcalendar_component
->
rrule
as
&
$rrule_data
)
{
// RRULEs must have an INTERVAL, or Date Repeat will throw errors.
if
(
!
isset
(
$rrule_data
[
'value'
][
'INTERVAL'
]))
{
$rrule_data
[
'value'
][
'INTERVAL'
]
=
'1'
;
...
...
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