You are here

emthumb.install in Embedded Media Field 6

Updates for the emthumb module.

File

contrib/emthumb/emthumb.install
View source
<?php

/**
 * @file
 * Updates for the emthumb module.
 */

/**
 *  New formatters and theme functions.
 */
function emthumb_update_6002() {
  drupal_rebuild_theme_registry();
  return _emthumb_update_reset_cache();
}

/**
 *  Rebuild the theme for new formatters.
 */
function _emthumb_update_add_new_formatters($message = NULL) {
  if (!isset($output)) {
    $output = t('Rebuilt the theme to accommodate new formatters.');
  }

  // Adding new formatters, so need to rebuild the theme.
  drupal_rebuild_theme_registry();

  // Also need to make sure we grab the new formatters themselves.
  $ret = _emthumb_update_reset_cache();
  $ret[] = array(
    'query' => $message,
    'success' => TRUE,
  );
  return $ret;
}

/**
 * Clear the Views cache.
 */
function _emthumb_update_reset_cache_views() {
  $ret = array();
  if (module_exists('views')) {
    $ret[] = update_sql("DELETE FROM {cache_views}");
  }
  return $ret;
}

/**
 *  Clear the content and views caches.
 */
function _emthumb_update_reset_cache() {
  $ret = _emthumb_update_reset_cache_views();
  $ret[] = update_sql("DELETE FROM {cache_content}");
  return $ret;
}

Functions

Namesort descending Description
emthumb_update_6002 New formatters and theme functions.
_emthumb_update_add_new_formatters Rebuild the theme for new formatters.
_emthumb_update_reset_cache Clear the content and views caches.
_emthumb_update_reset_cache_views Clear the Views cache.