Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
date_ical
Commits
5a75b9dd
Commit
5a75b9dd
authored
Sep 22, 2014
by
mglaman
Committed by
Robert Rollins
Sep 22, 2014
Browse files
Issue #2342933: Added option to silence Indefinite COUNT replacement warning.
Thanks go to user mgalman for the patch!
parent
0e07183c
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/DateiCalFeedsParser.inc
View file @
5a75b9dd
...
...
@@ -85,6 +85,7 @@ class DateiCalFeedsParser extends FeedsParser {
public
function
configDefaults
()
{
return
array
(
'indefinite_count'
=>
'52'
,
'indefinite_message_display'
=>
TRUE
,
'until_not_utc'
=>
FALSE
,
'skip_days'
=>
NULL
,
);
...
...
@@ -107,6 +108,12 @@ class DateiCalFeedsParser extends FeedsParser {
'#description'
=>
t
(
'Indefinitely repeating events are not supported. The repeat count will instead be set to this number.'
),
'#default_value'
=>
$this
->
config
[
'indefinite_count'
],
);
$form
[
'indefinite_message_display'
]
=
array
(
'#title'
=>
t
(
'Display message when RRULE is missing COUNT'
),
'#type'
=>
'checkbox'
,
'#default_value'
=>
$this
->
config
[
'indefinite_message_display'
],
'#description'
=>
t
(
'Display a message when an indefinitely repeating rule is adjusted by the "Indefinite COUNT" setting above.'
),
);
$form
[
'until_not_utc'
]
=
array
(
'#title'
=>
t
(
'RRULE UNTILs are not in UTC'
),
'#type'
=>
'checkbox'
,
...
...
libraries/ParserVcalendar.inc
View file @
5a75b9dd
...
...
@@ -448,17 +448,19 @@ class ParserVcalendar {
$rrule_data
[
'value'
][
'INTERVAL'
]
=
'1'
;
}
if
(
!
isset
(
$rrule_data
[
'value'
][
'COUNT'
])
&&
!
isset
(
$rrule_data
[
'value'
][
'UNTIL'
]))
{
if
(
(
!
isset
(
$rrule_data
[
'value'
][
'COUNT'
])
&&
!
isset
(
$rrule_data
[
'value'
][
'UNTIL'
]))
)
{
$msg
=
"The event with UID %uid has an indefinitely repeating RRULE, which the Date Repeat module doesn't support.
As a workaround, Date iCal set the repeat count to @count. This value can be customized in the iCal parser settings."
;
watchdog
(
'date_ical'
,
$msg
,
array
(
'%uid'
=>
$uid
,
'@count'
=>
$count
),
WATCHDOG_WARNING
);
drupal_set_message
(
t
(
"At least one of the events in this iCal feed has an indefinitely repeating RRULE, which the Date Repeat module doesn't support.<br>
As a workaround, Date iCal set the repeat count to @count. This value can be customized in the iCal parser settings."
,
array
(
'@count'
=>
$count
)),
'warning'
,
FALSE
);
if
(
$this
->
config
[
'indefinite_message_display'
])
{
drupal_set_message
(
t
(
"At least one of the events in this iCal feed has an indefinitely repeating RRULE, which the Date Repeat module doesn't support.<br>
As a workaround, Date iCal set the repeat count to @count. This value can be customized in the iCal parser settings."
,
array
(
'@count'
=>
$count
)),
'warning'
,
FALSE
);
}
$rrule_data
[
'value'
][
'COUNT'
]
=
$this
->
config
[
'indefinite_count'
];
}
}
...
...
Write
Preview
Supports
Markdown
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