You are here

function calendar_fields in Calendar 5

Same name and namespace in other branches
  1. 5.2 calendar.module \calendar_fields()

Identify all potential date/timestamp fields

4 calls to calendar_fields()
calendar_build_field_query in ./calendar.module
Build a filtering query for an individual date field
calendar_clear_all in ./calendar.module
Empty or reset cached values.
calendar_get_nodes in ./calendar.module
The workhorse function that takes the beginning array of items and alters it to an array of calendar nodes that the theme can handle.
_calendar_views_validate in ./calendar_admin.inc
Validate a view.
3 string references to 'calendar_fields'
calendar_clear_all in ./calendar.module
Empty or reset cached values.
calendar_update_5000 in ./calendar.install
Move these caches from 'cache' to 'cache_views' so they get cleared automatically whenever views_invalidate_cache() is called.
_calendar_fields in ./calendar_admin.inc
Identify all potential date/timestamp fields.

File

./calendar.module, line 1401
Adds calendar filtering and displays to Views.

Code

function calendar_fields($reset = FALSE) {
  static $fields;
  if (empty($fields) || $reset) {
    $cid = 'calendar_fields';
    if (!$reset && ($cached = cache_get($cid, 'cache_views'))) {
      $fields = unserialize($cached->data);
    }
    else {
      include_once './' . drupal_get_path('module', 'calendar') . '/calendar_admin.inc';
      $fields = _calendar_fields();
    }
  }
  return $fields;
}