Skip to content

Commit

Permalink
filter_jwplayer: 7-0.4 release
Browse files Browse the repository at this point in the history
See release notes for details.

I had to refactor upgrade routine, which is very bad practice, but since
(fortinately) reapplying upgrade does not break anything in our case, I
decided to increment version for existing upgrade routine which was already
published (though not released). The reason behind is to give more room for
JW6 branch version increment and keep possible upgrading to JW7 from JW6 at
any point with all required upgrade changes applied.
  • Loading branch information
kabalin committed Dec 1, 2015
1 parent c8653ce commit 5c58e61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 6 additions & 10 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ function xmldb_filter_jwplayer_upgrade($oldversion) {

$dbman = $DB->get_manager();

if ($oldversion < 2015080401) {
if ($oldversion < 2015112500) {
// Delete customskin file, as the setting has been removed.
$fs = get_file_storage();
$fs->delete_area_files(context_system::instance()->id, 'filter_jwplayer', 'playerskin', 0);
unset_config('customskin', 'filter_jwplayer');
if (get_config('filter_jwplayer', 'customskin') !== false) {
$fs = get_file_storage();
$fs->delete_area_files(context_system::instance()->id, 'filter_jwplayer', 'playerskin', 0);
unset_config('customskin', 'filter_jwplayer');
}

// Unset other removed settings.
unset_config('gatrackingobject', 'filter_jwplayer');

upgrade_plugin_savepoint(true, 2015080401, 'filter', 'jwplayer');
}

if ($oldversion < 2015112500) {
// Unset removed settings.
unset_config('securehosting', 'filter_jwplayer');
unset_config('accounttoken', 'filter_jwplayer');

Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2015080401; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2013111800; // Requires Moodle 2.6
$plugin->version = 2015112500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2015051100; // Requires Moodle 2.9
$plugin->component = 'filter_jwplayer'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->release = '0.3 for Moodle 2.6+ and JW Player 6';
$plugin->release = '7-0.4 for Moodle 2.9+, JW7 CDN 7.2.2)';

0 comments on commit 5c58e61

Please sign in to comment.