You are here

function mediafront_update_6008 in MediaFront 6.2

Same name and namespace in other branches
  1. 6 mediafront.install \mediafront_update_6008()

Remove all cached CSS files and clean up the paths in the mediafront presets.

File

./mediafront.install, line 374

Code

function mediafront_update_6008() {
  require_once getcwd() . '/' . drupal_get_path('module', 'mediafront') . '/players/osmplayer/player/OSMPlayer.php';
  require_once getcwd() . '/' . drupal_get_path('module', 'mediafront') . '/includes/mediafront.preset.inc';
  osmplayer_clear_css();
  $presets = mediafront_preset_get_presets();
  $player = new OSMPlayer();
  $paths = $player
    ->getPaths();
  foreach ($presets as $preset) {
    $preset['settings']['playerPath'] = $paths['playerPath'];
    unset($preset['settings']['playerURL']);
    mediafront_preset_save($preset);
  }
}