You are here

function yandex_metrics_update_7100 in Yandex.Metrics 7

Implementation of hook_update_N().

File

./yandex_metrics.install, line 26
Install, uninstall and update the module.

Code

function yandex_metrics_update_7100() {
  $schema = yandex_metrics_schema();
  if (!db_table_exists('yandex_metrics_popular_content')) {
    db_create_table('yandex_metrics_popular_content', $schema['yandex_metrics_popular_content']);
  }

  // Clear CSS and JS caches.
  drupal_clear_css_cache();
  drupal_clear_js_cache();

  // Rebuild the menu to add new item admin/yandex_metrics_ajax/%/%/%.
  menu_rebuild();

  // Flush content caches.
  cache_clear_all();
  return 'Caches have been flushed';
}