You are here

function mediafront_update_7006 in MediaFront 7

Same name and namespace in other branches
  1. 7.2 mediafront.install \mediafront_update_7006()

Change all the playerPath to be correct and delete the playerURL.

1 call to mediafront_update_7006()
mediafront_update_7007 in ./mediafront.install
Fix any CSS anomolies.

File

./mediafront.install, line 164

Code

function mediafront_update_7006() {
  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'mediafront') . '/players/osmplayer/player/OSMPlayer.php';
  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'mediafront') . '/includes/mediafront.preset.inc';
  $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);
  }
}