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
a5a5d3d3
Commit
a5a5d3d3
authored
Dec 21, 2012
by
Robert Rollins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed repeating dates on RRULE-less VEVENTs
parent
ded3e4a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
date_ical.module
date_ical.module
+8
-1
includes/DateIcalFeedsParser.inc
includes/DateIcalFeedsParser.inc
+8
-1
No files found.
date_ical.module
View file @
a5a5d3d3
...
...
@@ -182,7 +182,7 @@ function date_ical_feeds_plugins() {
),
);
$info
[
'DateIcalIcalcreatorParser'
]
=
array
(
'name'
=>
'iCal
C
reator parser'
,
'name'
=>
'iCal
c
reator parser'
,
'description'
=>
'Use iCalcreator to parse iCal feeds.'
,
'help'
=>
'Parse feeds in the iCal format using the iCalcreator library.'
,
'handler'
=>
array
(
...
...
@@ -192,6 +192,8 @@ function date_ical_feeds_plugins() {
'path'
=>
$path
,
),
);
/*
// Disabled until when (if) it can be updated to provide the same functionality as the iCalcreator parser.
$info['DateIcalDateModuleParser'] = array(
'name' => 'Date API iCal parser',
'description' => 'Use the Date module\'s API to parse iCal feeds.',
...
...
@@ -203,6 +205,7 @@ function date_ical_feeds_plugins() {
'path' => $path,
),
);
*/
return
$info
;
}
...
...
@@ -243,6 +246,10 @@ function date_ical_feeds_processor_targets_alter(&$targets, $entity_type, $bundl
* The RRULE string (with optional EXDATEs and RDATEs separated by \n).
*/
function
date_ical_feeds_set_rrule
(
$source
,
$entity
,
$target
,
$feed_element
)
{
if
(
empty
(
$feed_element
))
{
// Make sure that VEVENTs which have no RRULE aren't given repeating dates.
return
;
}
// Add the RRULE value to the field in $entity.
list
(
$field_name
,
$trash
)
=
explode
(
':'
,
$target
,
2
);
module_load_include
(
'inc'
,
'date_api'
,
'date_api_ical'
);
...
...
includes/DateIcalFeedsParser.inc
View file @
a5a5d3d3
...
...
@@ -59,7 +59,14 @@ abstract class DateIcalFeedsParser extends FeedsParser {
// and use listed handler to get source output
$handler
=
$this
::
$sources
[
$property_key
][
'date_ical_parse_handler'
];
$property
=
$item
->
getProperty
(
$key
);
return
$this
->
$handler
(
$property_key
,
$property
,
$item
,
$result
,
$source
);
if
(
empty
(
$property
))
{
// $property will be empty if the mapping is set up to parse optional source
// components (e.g. RRULE), and this particular VEVENT doesn't have one.
return
''
;
}
else
{
return
$this
->
$handler
(
$property_key
,
$property
,
$item
,
$result
,
$source
);
}
}
}
}
...
...
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