Projet

Général

Profil

Révision d756b39a

Ajouté par Assos Assos il y a environ 8 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/date_ical/date_ical.module
5 5
 * Adds ical functionality to Views, and an iCal parser to Feeds.
6 6
 */
7 7

  
8
/**
9
 * The version number of the current release. This is inserted into the PRODID
10
 * value of the iCal feeds created by Date iCal, for debugging purposes.
11
 */
12
define('DATE_ICAL_VERSION', '3.8');
13

  
14 8
/**
15 9
 * Exception class for generic exceptions thrown by this module.
16 10
 */
......
260 254
 *   Newer versions of Feeds send this value as an array containing the string.
261 255
 */
262 256
function date_ical_feeds_set_rrule($source, $entity, $target, $repeat_rule) {
263
  if (empty($repeat_rule)) {
264
    // Don't alter the entity if there's no repeat rule.
265
    return;
266
  }
267

  
268 257
  if (is_array($repeat_rule)) {
269 258
    // Newer versions of Feeds return $repeat_rule as an array containing the
270 259
    // string we returned from ParseVcalendar::parseRepeatProperty().
271 260
    $repeat_rule = reset($repeat_rule);
272 261
  }
273 262

  
263
  if (empty($repeat_rule)) {
264
    // Don't alter the entity if there's no repeat rule.
265
    return;
266
  }
267

  
274 268
  // $target looks like <field_name>:rrule, but we only need <field_name>.
275 269
  $field_name = current(explode(':', $target, 2));
276 270
  // Parse the repeat rule into RRULE, RDATE, EXRULE, and EXDATE strings.
......
281 275

  
282 276
  module_load_include('inc', 'date_ical', 'date_ical.utils');
283 277
  // This "loop" is really just to make sure we get the right array keys. It
284
  // souldn't ever execute more than once.
278
  // shouldn't ever execute more than once.
285 279
  foreach ($entity->{$field_name} as $lang => $date_values) {
286 280
    $values = _date_ical_get_repeat_dates($field_name, $repeat_data, $date_values[0], $source);
287 281
    foreach ($values as $key => $value) {
......
348 342
      'text_with_summary',
349 343
      'node_reference',
350 344
      'addressfield',
351
      'location'
345
      'location',
346
      'node_reference',
347
      'taxonomy_term_reference',
352 348
    );
353 349
    if (!$info || !in_array($info['type'], $supported_location_fields)) {
354 350
      continue;

Formats disponibles : Unified diff