You are here

function media_install in D7 Media 7.3

Same name and namespace in other branches
  1. 8 media.install \media_install()
  2. 7.4 media.install \media_install()
  3. 7 media.install \media_install()
  4. 7.2 media.install \media_install()

Implements hook_install().

File

./media.install, line 11
Install, update and uninstall functions for the Media module.

Code

function media_install() {

  // Start off with relative urls supported.
  variable_set('media_browser_relative_url', TRUE);

  // Make sure that we set the icon base directory variable if it is not
  // already set.
  $base = variable_get('media_icon_base_directory', NULL);
  if (!isset($base)) {
    $default_base = 'public://media-icons';
    variable_set('media_icon_base_directory', $default_base);
  }
  try {
    _media_install_copy_icons();
  } catch (Exception $e) {
    watchdog_exception('media', $e);
  }
}