~ubuntu-gr-webteam/ubuntu-gr-website/drupal6-site

« back to all changes in this revision

Viewing changes to sites/all/modules/calendar/includes/calendar.inc

  • Committer: Thanos Lefteris
  • Date: 2009-07-29 17:46:54 UTC
  • Revision ID: alefteris@gmail.com-20090729174654-pgfr1vtqw8ikvo5r
* Upgraded calendar module
* Upgraded commentrss module
* Upgraded date module
* Upgraded webfm module

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
//$Id: calendar.inc,v 1.1.2.38 2009/03/20 16:21:45 karens Exp $
 
2
//$Id: calendar.inc,v 1.1.2.40 2009/05/11 22:24:27 karens Exp $
3
3
/**
4
4
 * Build calendar
5
5
 *
263
263
  if (empty($view->date_info->min_date) || empty($view->date_info->max_date)) {
264
264
    return $items;
265
265
  }
266
 
  
267
266
  // Midnights are determined based on the same timezone as the View uses
268
267
  $display_timezone = date_timezone_get($view->date_info->min_date);
269
268
  $display_timezone_name = timezone_name_get($display_timezone);
350
349
        }
351
350
      }
352
351
    }
353
 
    
 
352
     
354
353
    // If there are multiple date fields in this calendar we may get
355
354
    // duplicate items from the other date fields, so add a way to
356
355
    // make sure each individual date field only gets added to the
377
376
        }
378
377
      }
379
378
      
380
 
      if (!in_array($id, $processed) && isset($item->calendar_fields->$alias)) {
 
379
      if (!in_array($id, $processed) && !empty($item->calendar_fields->$alias)) {
381
380
        
382
381
        // Create from and to date values for each item, adjusted to
383
382
        // the correct timezone.
384
 
        $values[0] = $item->calendar_fields->$fromto[0];
385
 
        $values[1] = $item->calendar_fields->$fromto[1];
386
 
                
 
383
        $values[0] = !empty($item->calendar_fields->$fromto[0]) ? $item->calendar_fields->$fromto[0] : $item->calendar_fields->$alias;
 
384
        $values[1] = !empty($item->calendar_fields->$fromto[1]) ? $item->calendar_fields->$fromto[1] : $item->calendar_fields->$alias;
 
385
               
387
386
        $db_tz   = date_get_timezone_db($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
388
387
        $to_zone = date_get_timezone($tz_handling, isset($item->$tz_alias) ? $item->$tz_alias : $display_timezone_name);
389
388