You are here

function date_clear_all in Date 5

Same name and namespace in other branches
  1. 5.2 date/date.module \date_clear_all()
  2. 6 date/date.module \date_clear_all()

Empty or reset cached values.

Parameters

$remove: whether or not to completely remove the caches.

4 calls to date_clear_all()
date_disable in ./date.install
Implementation of hook_disable(). Empty the date caches.
date_enable in ./date.install
Implementation of hook_enable(). Reset the calendar caches.
date_install in ./date.install
Implementation of hook_install(). Reset the date caches.
date_uninstall in ./date.install
Implementation of hook_uninstall().

File

./date.module, line 52
Defines a date/time field type.

Code

function date_clear_all($remove = FALSE) {

  // This gets called from the .install file, so make sure
  // relevant files are always included.
  include_once './' . drupal_get_path('module', 'content') . '/content.module';
  include_once './' . drupal_get_path('module', 'content') . '/content_admin.inc';
  if (module_exists('views')) {
    include_once './' . drupal_get_path('module', 'views') . '/views.module';
    include_once './' . drupal_get_path('module', 'date') . '/date_views.inc';
    if ($remove) {
      cache_clear_all('date_browser_views', 'cache_views');
    }
    else {
      date_views_browser_get_views(TRUE);
    }
  }
  content_clear_type_cache();
}