From 715320930537a211013d19aef93d377dfa301e84 Mon Sep 17 00:00:00 2001 From: YesCT Date: Sat, 25 Feb 2017 08:54:46 +0000 Subject: [PATCH] Issue #2854212: Change default libraries location. @todo Either move players to /libraries or put in the module. --- audiofield.install | 8 +++++++- config/audiofield.settings.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/audiofield.install b/audiofield.install index ec7669f..3ebb4d2 100644 --- a/audiofield.install +++ b/audiofield.install @@ -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. diff --git a/config/audiofield.settings.json b/config/audiofield.settings.json index 6928036..24a635b 100644 --- a/config/audiofield.settings.json +++ b/config/audiofield.settings.json @@ -3,5 +3,5 @@ "audioplayer": "html5", "audioplayer_wav": "html5", "audioplayer_ogg": "html5", - "players_dir": "sites/all/libraries/player" + "players_dir": "libraries/player" }