You are here

emaudio.install in Embedded Media Field 6

This is the emaudio.module's install, configuration, and removal file.

File

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

/**
 * @file
 * This is the emaudio.module's install, configuration, and removal file.
 */

/**
 * Implementation of hook_install().
 */
function emaudio_install() {
  drupal_load('module', 'content');
  content_notify('install', 'emaudio');
}

/**
 * Implementation of hook_uninstall().
 */
function emaudio_uninstall() {
  drupal_load('module', 'content');
  content_notify('uninstall', 'emaudio');
}

/**
 * Implementation of hook_enable().
 */
function emaudio_enable() {
  drupal_load('module', 'content');
  content_notify('enable', 'emaudio');
}

/**
 * Implementation of hook_disable().
 */
function emaudio_disable() {
  drupal_load('module', 'content');
  content_notify('disable', 'emaudio');
}
function emaudio_update_1() {
  $ret = _emaudio_update_reset_cache_views();
  return $ret;
}

// I'd like this to be conditional, so it only runs if they don't have views installed.
// however, module_exists doesn't actually work in the update scripts.
function _emaudio_update_reset_cache_views() {
  $ret = array();
  $ret[] = update_sql("DELETE FROM {cache_views}");
  return $ret;
}

Functions