Révision c7b88c87
Ajouté par Assos Assos il y a presque 9 ans
drupal7/sites/all/modules/date_ical/libraries/ParserVcalendar.inc | ||
---|---|---|
91 | 91 |
$this->timezones[] = $component; |
92 | 92 |
} |
93 | 93 |
|
94 |
// This content array is used by date_ical_import_component_alter() and
|
|
94 |
// This context array is used by date_ical_import_component_alter() and
|
|
95 | 95 |
// date_ical_import_parsed_data_alter(). |
96 | 96 |
$context2 = array( |
97 | 97 |
'calendar' => $this->calendar, |
... | ... | |
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
if ($text === FALSE) { |
228 |
if ($property_key == 'SUMMARY') { |
|
228 |
if ($property_key != 'SUMMARY') { |
|
229 |
return NULL; |
|
230 |
} |
|
231 |
else { |
|
229 | 232 |
$uid = $vcalendar_component->getProperty('UID'); |
230 |
throw new DateIcalParseException(t('The component with UID %uid is invalid because it has no SUMMARY (nodes require a title).', array('%uid' => $uid))); |
|
233 |
if ($vcalendar_component->objName == 'vfreebusy') { |
|
234 |
// FREEBUSY elements can't have SUMMARY, but they can have COMMENT. |
|
235 |
// So if the feed has been configured to ask for SUMMARY, use COMMENT |
|
236 |
// instead. If COMMENT is also missing, we can't import. |
|
237 |
$text = $vcalendar_component->getProperty('COMMENT'); |
|
238 |
if ($text === FALSE) { |
|
239 |
throw new DateIcalParseException(t('The VFREEBUSY component with UID %uid is invalid because it has no COMMENT. |
|
240 |
Nodes require a title, and since VFREEBUSY components can\'t have SUMMARY, Date iCal pulls that title from the COMMENT.', |
|
241 |
array('%uid' => $uid)) |
|
242 |
); |
|
243 |
} |
|
244 |
} |
|
245 |
else { |
|
246 |
// Non-VFREEBUSY components must have a SUMMARY. |
|
247 |
throw new DateIcalParseException(t('The component with UID %uid is invalid because it has no SUMMARY (nodes require a title).', |
|
248 |
array('%uid' => $uid)) |
|
249 |
); |
|
250 |
} |
|
231 | 251 |
} |
232 |
// If the component doesn't have this property, return NULL. |
|
233 |
return NULL; |
|
234 | 252 |
} |
235 | 253 |
// Convert literal \n and \N into newline characters. |
236 | 254 |
$text = str_replace(array('\n', '\N'), "\n", $text); |
Formats disponibles : Unified diff
Weekly update of contrib modules