You are here

function media_update_7013 in D7 Media 7.4

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

Work around a core bug where text format cacheability is not updated.

See also

http://drupal.org/node/993230

File

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

Code

function media_update_7013() {
  $formats = filter_formats();
  foreach ($formats as $format) {
    $format->filters = filter_list_format($format->format);

    // filter_format_save() expects filters to be an array, however
    // filter_list_format() gives us objects.
    foreach ($format->filters as $key => $value) {
      $format->filters[$key] = (array) $value;
    }
    filter_format_save($format);
  }
}