You are here

function mediafront_update_6008 in MediaFront 6

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

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

1 call to mediafront_update_6008()
mediafront_update_6009 in ./mediafront.install
Fix any bad css paths.

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();
  $path = $player
    ->getPlayerPath();
  foreach ($presets as $preset) {
    $preset['settings']['playerPath'] = $path;
    unset($preset['settings']['playerURL']);
    mediafront_preset_save($preset);
  }
}