You are here

function media_update_7217 in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 media.install \media_update_7217()
  2. 7.3 media.install \media_update_7217()

Copy file type icons to public files directory.

File

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

Code

function media_update_7217() {

  // Remove any trailing slashes from the icon base directory variable.
  $dir = variable_get('media__icon_base_directory');
  if (!empty($dir)) {
    $dir = rtrim($dir, '/');
    variable_set('media__icon_base_directory', $dir);
  }
  try {
    _media_install_copy_icons();
  } catch (Exception $e) {
    throw new DrupalUpdateException($e
      ->getMessage());
  }
}