Skip to content

Commit

Permalink
Issue #2854212: Change default libraries location.
Browse files Browse the repository at this point in the history
@todo Either move players to /libraries or put in the module.
  • Loading branch information
YesCT committed Feb 25, 2017
1 parent 860762b commit 7153209
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion audiofield.install
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ function audiofield_update_1000() {
$config->set('audioplayer', update_variable_get('audiofield_audioplayer', 'html5'));
$config->set('audioplayer_wav', update_variable_get('audiofield_audioplayer_wav', 'html5'));
$config->set('audioplayer_ogg', update_variable_get('audiofield_audioplayer_ogg', 'html5'));
$config->set('players_dir', update_variable_get('audiofield_players_dir', 'sites/all/libraries/player'));

$new_default_players_dir = '/libraries/player';
$previous_players_dir = update_variable_get('audiofield_players_dir', $new_default_players_dir);
if ($previous_players_dir != $new_default_players_dir) {
// @todo Move players. Set message that default location changed.
}
$config->set('players_dir', $new_default_players_dir);
$config->save();

// Delete variables.
Expand Down
2 changes: 1 addition & 1 deletion config/audiofield.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"audioplayer": "html5",
"audioplayer_wav": "html5",
"audioplayer_ogg": "html5",
"players_dir": "sites/all/libraries/player"
"players_dir": "libraries/player"
}

0 comments on commit 7153209

Please sign in to comment.